Example #1
0
 protected LineStream(string path, char separator, int key = 0, bool allowDuplicates = true)
 {
     _keyIndex        = key;
     _allowDuplicates = allowDuplicates;
     _separator       = separator;
     _allLines        = LineStreamReader.ReadAllLines(path, out _newLine).ToList();
     _init();
 }
Example #2
0
        public static string[] ReadAllLines(string path, out string newLine)
        {
            String    line;
            ArrayList lines = new ArrayList();

            using (LineStreamReader sr = new LineStreamReader(path, SdeAppConfiguration.EncodingServer)) {
                while ((line = sr.ReadLine()) != null)
                {
                    lines.Add(line);
                }

                newLine = sr.LineType;
            }

            return((String[])lines.ToArray(typeof(String)));
        }