public static IEnumerable<string> ReadLines(string path) { if (path == null) throw new ArgumentNullException(nameof(path)); if (path.Length == 0) throw new ArgumentException(SR.Argument_EmptyPath, nameof(path)); return ReadLinesIterator.CreateIterator(path, Encoding.UTF8); }
public static IEnumerable <string> ReadLines(string path, Encoding encoding) { if (path == null) { throw new ArgumentNullException(nameof(path)); } if (encoding == null) { throw new ArgumentNullException(nameof(encoding)); } if (path.Length == 0) { throw new ArgumentException(SR.Argument_EmptyPath, nameof(path)); } return(ReadLinesIterator.CreateIterator(path, encoding)); }