CsvColumnIndexAttribute Class
Sets the 0-based index of the column of a property or a field.
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false)]
public sealed class CsvColumnIndexAttribute : CsvAttributeRemarks
Without a header row, the serializer reads and writes the value of the member in this column. A member without this attribute uses the column at its position in the list of the members, and the columns that no member uses are written as empty values. With a header row, the columns are read by name.
- Inheritance
CsvAttributeCsvColumnIndexAttribute
Constructors
| Name | Description |
|---|---|
| CsvColumnIndexAttribute(int) | Sets the 0-based index of the column of a property or a field. |
CsvColumnIndexAttribute(int)
CsvColumnIndexAttribute.csSets the 0-based index of the column of a property or a field.
public CsvColumnIndexAttribute(int index)Parameters
indexint- The 0-based index of the column.
Remarks
Without a header row, the serializer reads and writes the value of the member in this column. A member without this attribute uses the column at its position in the list of the members, and the columns that no member uses are written as empty values. With a header row, the columns are read by name.
Properties
| Name | Description |
|---|---|
| Index | Gets the 0-based index of the column. |