CSVReader Class

/// A reader that reads from a stream and emits CSV records ///
Public Class CSVReader 
Implements IEnumerable(Of String), _ 
IDisposable
This language is not supported or no code example is available.
public class CSVReader : IEnumerable<string>, 
IDisposable
This language is not supported or no code example is available.
public ref class CSVReader  : public array< IEnumerable<String^>^ >^, 
public IDisposable^
This language is not supported or no code example is available.
JScript does not support generic types and methods.
This language is not supported or no code example is available.
Name Description
Public constructor CSVReader(Stream, CSVSettings) /// Construct a new CSV reader off a streamed source ///
Public constructor CSVReader(StreamReader, CSVSettings) /// Construct a new CSV reader off a streamed source ///
Top
Name Description
Public property Headers /// If the first row in the file is a header row, this will be populated ///
Public property Settings /// The settings currently in use by this reader ///
Top
Methods
 
Name Description
Public method Static ChopFile(string, string, int, CSVSettings) /// Take a CSV file and chop it into multiple chunks of a specified maximum size. ///
Public method Deserialize<T>() /// Deserialize the CSV reader into a generic list ///
Public method Dispose() /// Close our resources - specifically, the stream reader ///
Public method Static FromFile(string, CSVSettings, Encoding) /// Convenience function to read from a file on disk ///
Public method Static FromString(string, CSVSettings) /// Convenience function to read from a string ///
Public method GetEnumerator() /// Iterate through all lines in this CSV file ///
Public method Lines() /// Iterate through all lines in this CSV file ///
Public method ReadAsDataTable() /// Read this file into a data table in memory ///
Top

.NET Framework

Supported in: 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8

In this article

Definition