Example #1
0
        public static string[] ReadAllLines(string path, Encoding encoding, out string newLine)
        {
            String    line;
            ArrayList lines = new ArrayList();

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

                newLine = sr.LineType;
            }

            return((String[])lines.ToArray(typeof(String)));
        }
Example #2
0
 protected LineStream(string path, char separator)
 {
     _separator = separator;
     _allLines  = LineStreamReader.ReadAllLines(path, EncodingService.DisplayEncoding, out _newLine).ToList();
     Init();
 }
		public static string[] ReadAllLines(string path, Encoding encoding, out string newLine) {
			String line;
			ArrayList lines = new ArrayList();

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

				newLine = sr.LineType;
			}

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