public static IEnumerable <string[]> Read( IFileSystem fileSystem, string filename, char quoteChar, char delimiter, int firstColumn, int maxColumns) { using (Stream stream = fileSystem.CreateStream(filename)) { using (StreamReader csvStream = new StreamReader(stream)) return(CsvOperations.Read(csvStream, quoteChar, delimiter, firstColumn, maxColumns)); } }
public static IEnumerable <string[]> Read( string filename, char quoteChar, char delimiter, int firstColumn, int maxColumns) { using (StreamReader reader = new StreamReader(filename)) { foreach (string[] strArray in CsvOperations.Read(reader, quoteChar, delimiter, firstColumn, maxColumns)) { yield return(strArray); } } }