CsvReader Class |
Namespace: Accord.IO
The CsvReader type exposes the following members.
Name | Description | |
---|---|---|
CsvReader(Stream, Boolean) |
Initializes a new instance of the CsvReader class.
| |
CsvReader(TextReader, Boolean) |
Initializes a new instance of the CsvReader class.
| |
CsvReader(String, Boolean) |
Initializes a new instance of the CsvReader class.
| |
CsvReader(TextReader, Boolean, Char) |
Initializes a new instance of the CsvReader class.
| |
CsvReader(TextReader, Boolean, Int32) |
Initializes a new instance of the CsvReader class.
| |
CsvReader(TextReader, Boolean, Char, Int32) |
Initializes a new instance of the CsvReader class.
|
Name | Description | |
---|---|---|
BufferSize |
Gets the buffer size.
| |
Comment |
Gets the comment character indicating that
a line is commented out. Default is '#'.
| |
CurrentRecordIndex |
Gets the current record index in the CSV file.
| |
DefaultHeaderName |
Gets or sets the default header name when it is an empty string or only whitespaces.
The header index will be appended to the specified name. Default is "Column".
| |
DefaultParseErrorAction |
Gets or sets the default action to take when a parsing error has occured.
| |
Delimiter |
Gets the delimiter character separating each field. If
set to zero ('\0') the reader will try to guess the
delimiter character automatically from the first line
of the file.
| |
EndOfStream |
Gets a value that indicates whether the current stream position is at the end of the stream.
| |
Escape |
Gets the escape character letting insert quotation
characters inside a quoted field. Default is '"'.
| |
FieldCount |
Gets the maximum number of fields to retrieve for each record.
| |
HasHeaders |
Indicates if field names are located on the first non commented line.
| |
IsDisposed |
Gets a value indicating whether the instance has been disposed of.
| |
ItemInt32 |
Gets the field at the specified index.
| |
ItemString |
Gets the field with the specified name. [M:hasHeaders] must be .
| |
ItemInt32, Int32 |
Gets the field at the specified index and record position.
| |
ItemInt32, String |
Gets the field with the specified name and record position. [M:hasHeaders] must be .
| |
MissingFieldAction |
Gets or sets the action to take when a field is missing.
| |
MissingFieldFlag |
Indicates if one or more field are missing for the current record.
Resets after each successful record read.
| |
ParseErrorFlag |
Indicates if a parse error occurred for the current record.
Resets after each successful record read.
| |
Quote |
Gets the quotation character wrapping
every field. Default is '"'.
| |
SkipEmptyLines |
Gets or sets a value indicating if the reader will skip empty lines.
| |
SupportsMultiline |
Gets or sets a value indicating if the reader supports multiline fields.
| |
TrimmingOption |
Indicates if spaces at the start and end of a field
are trimmed. Default is to trim unquoted fields only.
|
Name | Description | |
---|---|---|
CheckDisposed |
Checks if the instance has been disposed of, and if it has, throws an ObjectDisposedException; otherwise, does nothing.
| |
Close |
Closes the IDataReader Object.
| |
CopyCurrentRecordTo(String) |
Copies the field array of the current record to a one-dimensional array, starting at the beginning of the target array.
| |
CopyCurrentRecordTo(String, Int32) |
Copies the field array of the current record to a one-dimensional array, starting at the beginning of the target array.
| |
Dispose |
Releases all resources used by the instance.
| |
Dispose(Boolean) |
Releases the unmanaged resources used by this instance and optionally releases the managed resources.
| |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Finalize |
Releases unmanaged resources and performs other cleanup operations before the instance is reclaimed by garbage collection.
(Overrides ObjectFinalize.) | |
FromText |
Creates a new CsvReader to read from a string.
| |
FromUrl |
Creates a new CsvReader to read from a Web URL.
| |
GetEnumerator |
Returns an RecordEnumerator that can iterate through CSV records.
| |
GetFieldHeaders |
Gets the field headers.
| |
GetFieldIndex |
Gets the field index for the provided header.
| |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
MoveTo |
Moves to the specified record index.
| |
OnDisposed |
Raises the [M:Disposed] event.
| |
OnParseError |
Raises the [M:ParseError] event.
| |
ReadLine |
Reads the entire stream into a list of records.
| |
ReadNextRecord |
Reads the next record.
| |
ReadNextRecord(Boolean, Boolean) |
Reads the next record.
| |
ReadToEnd |
Reads the entire stream into a list of records.
| |
ToJagged |
Reads the entire stream into a jagged matrix.
| |
ToJaggedT |
Reads the entire stream into a jagged matrix.
| |
ToMatrix |
Reads the entire stream into a multi-dimensional matrix.
| |
ToMatrixT |
Reads the entire stream into a multi-dimensional matrix.
| |
ToString | Returns a string that represents the current object. (Inherited from Object.) | |
ToTable |
Reads the entire stream into a DataTable.
| |
ToTable(String) |
Reads the entire stream into a DataTable.
|
Name | Description | |
---|---|---|
Disposed |
Occurs when the instance is disposed of.
| |
ParseError |
Occurs when there is an error while parsing the CSV stream.
|
Name | Description | |
---|---|---|
DefaultBufferSize |
Defines the default buffer size.
| |
DefaultComment |
Defines the default comment character indicating that a line is commented out.
| |
DefaultDelimiter |
Defines the default delimiter character separating each field.
| |
DefaultEscape |
Defines the default escape character letting insert quotation characters inside a quoted field.
| |
DefaultQuote |
Defines the default quote character wrapping every field.
|
Name | Description | |
---|---|---|
HasMethod |
Checks whether an object implements a method with the given name.
(Defined by ExtensionMethods.) | |
IsEqual |
Compares two objects for equality, performing an elementwise
comparison if the elements are vectors or matrices.
(Defined by Matrix.) | |
SetEqualsString |
Compares two enumerables for set equality. Two
enumerables are set equal if they contain the
same elements, but not necessarily in the same
order.
(Defined by Matrix.) | |
To(Type) | Overloaded.
Converts an object into another type, irrespective of whether
the conversion can be done at compile time or not. This can be
used to convert generic types to numeric types during runtime.
(Defined by ExtensionMethods.) | |
ToT | Overloaded.
Converts an object into another type, irrespective of whether
the conversion can be done at compile time or not. This can be
used to convert generic types to numeric types during runtime.
(Defined by ExtensionMethods.) |