Click or drag to resize
CsvDataReader Class
Provides a datasource for the .Net Framework SqlBulkCopy class which allows data to be rapidly imported into SQL Server.
Inheritance Hierarchy

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

The CsvDataReader type exposes the following members.

Constructors
  NameDescription
Public methodCsvDataReader(TextReader)
Constructs a CsvDataReader object using a TextReader object as the data source. Uses a comma as the column delimiter.
Public methodCsvDataReader(String)
Creates a CsvDataReader object using a file as the data source. Uses a comma as the column delimiter and Default as the encoding.
Public methodCsvDataReader(Stream, Encoding)
Constructs a CsvDataReader object using a Stream object as the data source. Uses a comma as the column delimiter.
Public methodCsvDataReader(TextReader, Char)
Constructs a CsvDataReader object using a TextReader object as the data source.
Public methodCsvDataReader(String, Char)
Creates a CsvDataReader object using a file as the data source. Uses Default as the encoding.
Public methodCsvDataReader(Stream, Char, Encoding)
Constructs a CsvDataReader object using a Stream object as the data source.
Public methodCsvDataReader(String, Char, Encoding)
Creates a CsvDataReader object using a file as the data source.
Top
Methods
  NameDescription
Public methodClose
Closes and releases all related resources.
(Inherited from DataReaderBase.)
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 methodGetType
Gets the type of the current instance.
(Inherited from Object.)
Public methodStatic memberParse
Creates a CsvDataReader object using a string of data as the source. Uses Default as the encoding.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Properties
  NameDescription
Public propertyColumns
Collection of columns to include in the source data.
Public propertySettings
Has all the options that are able to be set that will affect the way records are parsed.
Top
Events
  NameDescription
Public eventReadRecord
This event is raised after each record has been read and before the values have been converted to the destination type. This event can be used to modify values in a record, add values to a record, or skip a record entirely.
(Inherited from DataReaderBase.)
Top
See Also