CsvColumn Class

Represents a column in a CSV file with its name and index position.

public class CsvColumn

Constructors

NameDescription
CsvColumn(int)Initializes a new instance of the CsvColumn class with the specified index.
CsvColumn(string?, int)Initializes a new instance of the CsvColumn class with the specified name and index.

CsvColumn overloads

CsvColumn(int)

CsvColumn.cs

Initializes a new instance of the CsvColumn class with the specified index.

public CsvColumn(int index)
Parameters
index int
The zero-based index of the column.

CsvColumn(string?, int)

CsvColumn.cs

Initializes a new instance of the CsvColumn class with the specified name and index.

public CsvColumn(string? name, int index)
Parameters
name string?
The name of the column.
index int
The zero-based index of the column.

Properties

NameDescription
IndexGets the zero-based index of the column.
NameGets the name of the column, or null if the CSV file has no header row.

Gets the zero-based index of the column.

public int Index { get; }

Property value

int

Gets the name of the column, or null if the CSV file has no header row.

public string? Name { get; }

Property value

string?