www.csvreader.com

CsvReader overview

Public Static (Shared) Methods

Parse Creates a CsvReader object using a string of data as the source. Uses Default as the encoding.

Public Instance Constructors

CsvReaderOverloaded. Initializes a new instance of the CsvReader class.

Public Instance Properties

ColumnCount The count of columns found in the current record.
Comment The character to use as a comment signal. Default is pound, '#'.
CurrentRecord The index of the current record.
Delimiter The character to use as the column delimiter. Default is comma, ','.
EscapeMode Specifies how to escape an occurance of system characters, like the TextQualifier and Delimiter, inside field values when required. Default is Doubled.
HeaderCount The count of headers read in by a previous call to ReadHeaders.
Headers Returns the header values as a string array.
ItemOverloaded. Returns the current column value for a given column index.
RecordDelimiter The character to use as the record delimiter. Default is combination of standard end of line characters for Windows, Unix, or Mac.
SafetySwitch Safety caution to prevent the parser from using large amounts of memory in the case where parsing settings like file encodings don't end up matching the actual format of a file. This switch can be turned off if the file format is known and tested. With the switch off, the max column lengths and max column count per record supported by the parser will greatly increase. Default is true.
SkipEmptyRecords Whether to treat a record with no data as if it wasn't there or not. When set to true, two consecutive occurances of the record delimiter will be treated as only one. Default is true.
TextQualifier The character to use as a text qualifier in the data. Default is quote, '"'.
TrimWhitespace Whether to trim leading and trailing whitespace characters from non-textqualified column data. Default is true.
UseComments Whether to look for comments while parsing or not. Default is false.
UseTextQualifier Whether to use a text qualifier while parsing or not. Default is true.
Values Returns the columns values for the current record as a string array.

Public Instance Methods

Close Closes and releases all related resources.
Equals (inherited from Object)Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object)Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetHeader Returns the column header value for a given columnIndex.
GetIndex Gets the corresponding column index for a given headerName.
GetLength Returns the length of a column without doing extra work to find the column's actual value.
GetType (inherited from Object)Gets the Type of the current instance.
IsQualified Determines whether a specified column was qualified or not.
ReadHeaders Read the first record of data as column headers.
ReadRecord Reads another record.
ReadToEndOverloaded. Reads till the end of the csv data.
SkipLine Skips the next line of data using the standard end of line characters and does not do any column delimited parsing.
SkipRecord Skips the next record of data by parsing each column. Does not increment CurrentRecord.
ToString (inherited from Object)Returns a String that represents the current Object.

Explicit Interface Implementations

IDisposable.Dispose
IEnumerable.GetEnumerator
IEnumerator.MoveNext
IEnumerator.Reset

See Also

CsvReader Class | Csv Namespace