Click or drag to resize
CsvReader Class
A stream based parser for parsing delimited text data from a file or a stream.
Inheritance Hierarchy

Namespace: DataStreams.Csv
Assembly: DataStreams (in DataStreams.dll) Version: 5.20.0.0
Syntax
public sealed class CsvReader : ReaderBase

The CsvReader type exposes the following members.

Constructors
  NameDescription
Public methodCsvReader(TextReader)
Constructs a CsvReader object using a TextReader object as the data source. Uses a comma as the column delimiter.
Public methodCsvReader(String)
Creates a CsvReader object using a file as the data source. Uses a comma as the column delimiter and Default as the encoding.
Public methodCsvReader(Stream, Encoding)
Constructs a CsvReader object using a Stream object as the data source. Uses a comma as the column delimiter.
Public methodCsvReader(TextReader, Char)
Constructs a CsvReader object using a TextReader object as the data source.
Public methodCsvReader(String, Char)
Creates a CsvReader object using a file as the data source. Uses Default as the encoding.
Public methodCsvReader(Stream, Char, Encoding)
Constructs a CsvReader object using a Stream object as the data source.
Public methodCsvReader(String, Char, Encoding)
Creates a CsvReader object using a file as the data source.
Top
Methods
  NameDescription
Public methodClose
Closes and releases all related resources.
(Inherited from ReaderBase.)
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetHeader
Returns the column header value for a given columnIndex.
Public methodGetIndex
Gets the corresponding column index for a given headerName.
Public methodGetType
Gets the type of the current instance.
(Inherited from Object.)
Public methodIsQualified
Determines whether a specified column was qualified or not.
Public methodStatic memberParse
Creates a CsvReader object using a string of data as the source. Uses Default as the encoding.
Public methodReadHeaders
Read the first record of data as column headers.
Public methodReadRecord
Reads another record.
(Overrides ReaderBaseReadRecord.)
Public methodReadToEnd
Reads till the end of the csv data. Reads the first line in the data as column headers.
Public methodReadToEnd(Boolean)
Reads till the end of the csv data.
Public methodReadToEnd(Boolean, UInt64)
Reads till the end of the csv data.
Public methodSkipLine
Skips the next line of data using the standard end of line characters and does not do any column delimited parsing.
Public methodSkipRecord
Skips the next record of data by parsing each column. Does not increment CurrentRecord.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Properties
  NameDescription
Public propertyColumnCount
The count of columns found in the current record.
Public propertyCurrentRecord
The index of the current record.
(Inherited from ReaderBase.)
Public propertyHeaderCount
Public propertyHeaders
Returns the header values as a string array.
Public propertyItemInt32
Returns the current column value for a given column index.
(Inherited from ReaderBase.)
Public propertyItemString
Returns the current column value corresponding to the headerName.
Public propertyRawRecord
Returns the text of the current record as it existed before parsing.
Public propertySettings
Has all the options that are able to be set that will affect the way records are parsed and accessed.
Public propertyValues
Returns the columns values for the current record as a string array.
(Inherited from ReaderBase.)
Top
See Also