c52349bf 1dc1 7571 2ca5 d90ee6f63ea6 - akesseler/Plexdata.CsvParser GitHub Wiki
This method tries to determine the column for provided header.
Namespace: Plexdata.CsvParser.Processors
Assembly: Plexdata.CsvParser.NET (in Plexdata.CsvParser.NET.dll) Version: 1.1.3+d5bef99aa35461ce4bafadf0bf2c2aeca18044ea
C#
public int GetColumnIndex(
string header
)
- header
- Type: System.String
The header name to get a column index for.
Type: Int32
The index of the first fitting column. But -1
is returned in case of Heading is disabled, header name is null
, empty or whitespace, or header name could not be found.
The header of a CSV content is defined as its very first row. But such a header row is actually just an optional value. Against this background this method can only return a fitting column if the user knows that a particular CSV content contains a header row. Therefore, treating the first item of each column as header must be enabled by property Heading Otherwise, this method does never return a valid header column index.
CsvContainer Class
Plexdata.CsvParser.Processors Namespace
CsvContainer.Heading