WikiFunctions.UnifiedDiff.LoadFileLines C# (CSharp) Method

LoadFileLines() static private method

static private LoadFileLines ( string file ) : string[]
file string
return string[]
        internal static string[] LoadFileLines(string file)
        {
            if (file == null) throw new ArgumentNullException("file");
            ArrayList lines = new ArrayList();
            using (StreamReader reader = new StreamReader(file))
            {
                string s;
                while ((s = reader.ReadLine()) != null)
                {
                    lines.Add(s);
                }
            }
            return (string[]) lines.ToArray(typeof(string));
        }

Usage Example

Esempio n. 1
0
 public Diff(string leftFile, string rightFile, bool caseSensitive, bool compareWhitespace)
     : this(
         UnifiedDiff.LoadFileLines(leftFile), UnifiedDiff.LoadFileLines(rightFile), caseSensitive,
         compareWhitespace)
 {
 }