CsvRecord Class

Represents a record (row) of the CSV file.

Definition

Namespace: FolkerKinzel.CsvTools
Assembly: FolkerKinzel.CsvTools (in FolkerKinzel.CsvTools.dll) Version: 2.0.1+2345335399184346d9b2cc992ed5c814406052c1
C#
public sealed class CsvRecord : IEnumerable<KeyValuePair<string, ReadOnlyMemory<char>>>, 
	IEnumerable
Inheritance
Object    CsvRecord
Implements
IEnumerableKeyValuePairString, ReadOnlyMemoryChar, IEnumerable

Remarks

The column order corresponds to that of the CSV file and all columns are of the ReadOnlyMemory<char> Type. The content of the columns can be accessed with the column name or with its zero-based column index.

Properties

ColumnNamesGets the column names.
CountReturns the number of columns in the CsvRecord instance.
HasCaseSensitiveColumnNames Gets a value indicating whether the ColumnNames are treated case-sensitive.
IsEmptyGets whether or not the instance contains usable data.
ItemInt32Gets or sets the value of the column in the CSV file that is at the specified index.
ItemStringGets or sets the value associated with the specified column name in the CSV file.
Values Gets the array of data stored in CsvRecord.

Methods

ClearSets all data fields of CsvRecord to default.
ContainsColumnDetermines whether the CsvRecord object contains a column with the specified column name.
EqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
GetEnumeratorReturns an IEnumerator<KeyValuePair<string, ReadOnlyMemory<Char>>> to iterate over the CsvRecord object. The KeyValuePair<string, ReadOnlyMemory<Char>> contains the column name as Key and the content of the column as Value.
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetTypeGets the Type of the current instance.
(Inherited from Object)
IndexOfColumnReturns the zero-based index of the column in the CSV file, that has the specified column name, or -1, if columnName is not one of the column names in the CSV file.
ToStringReturns a string that represents the current object.
(Overrides ObjectToString)
TryGetValueTries to get the value associated with the specified column name in the CSV file.

Extension Methods

FillWith Fills record with the items of a String collection.
(Defined by CsvRecordExtension)
FillWith Fills record with the items of a read-only span of Strings.
(Defined by CsvRecordExtension)
FillWith Fills record with the items of a read-only span of ReadOnlyMemory<Char> values.
(Defined by CsvRecordExtension)
FillWith Fills record with the content of a String array.
(Defined by CsvRecordExtension)
FillWith Fills record with the items of an IEnumerable.
(Defined by CsvRecordExtension)
ToDictionary Converts a CsvRecord instance to a Dictionary<string, ReadOnlyMemory<char>>.
(Defined by CsvRecordExtension)

Explicit Interface Implementations

IEnumerableGetEnumeratorReturns an enumerator that iterates through a collection.

See Also