Thetype exposes the following members.
Constructs an instance to read from a TextReader.
Constructs an instance to read from a CSV string.
Constructs an instance to read from a CsvReader.
Constructs an instance to read from a stream.
Returns the dictionary that case insensitvely maps a column name to the zero based index of the column.
Returns the list of table columns in the order read from the source.
Indexer that returns the value for a column.
Indexer that returns the value for the named column in the current row.
Returns the underlying CsvReader or null if the reader is closed.
Closes the reader if it is still open.
Releases any system resources held by the instance,
Determines whether the specified object is equal to the current object.(Inherited from Object.)
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)
Returns the value for the named column in the current row.
Serves as the default hash function.(Inherited from Object.)
Gets the Type of the current instance.(Inherited from Object.)
Determines whether a cell in a named column in the current row is empty or if the column does not exist.
Creates a shallow copy of the current Object.(Inherited from Object.)
Reads the next row of table.
Returns an enumerator that returns the data rows from a.
Returns a string that represents the current object.(Inherited from Object.)
This class makes it easy to process tabular data loaded from a CSV file, where the first row of the file contains the row header strings that identify the table columns.
Initialize an instance by passing a CsvReader, stream, string, or file path to the constructor. The constructor will read the first row of the file and initialize the ColumnMap dictionary which maps the case insensitive column name to the zero based index of the column in the table.
You'll process each data row by calling ReadRow. This returns a list with the next row of data or null if the end of the table has been reached. You can process the row data returned directly or use the GetColumn(String) method to access a column value on the current row directly.
|This class is tolerant of blank or duplicate column names. In the case of duplicates, the first column matching the requested column name will be used when parsing data.|
Applications should call the reader's Dispose or Close method when they are finished with the reader so that the underlying CsvReader will be closed as well, promptly releasing any system resources (such as the stream).