Class CsvIndexAttribute
- Namespace
- FlameCsv.Attributes
- Assembly
- FlameCsv.Core.dll
Configures the field index used when reading or writing CSV.
When not placed on a member or parameter, MemberName must be set.
When placed on an assembly, TargetType must be set.
[AttributeUsage(AttributeTargets.Assembly|AttributeTargets.Class|AttributeTargets.Struct|AttributeTargets.Property|AttributeTargets.Field|AttributeTargets.Interface|AttributeTargets.Parameter, AllowMultiple = true)]
public sealed class CsvIndexAttribute : CsvFieldConfigurationAttribute
- Inheritance
-
CsvIndexAttribute
- Inherited Members
Constructors
CsvIndexAttribute(int)
Initializes a new instance of the CsvIndexAttribute class.
public CsvIndexAttribute(int index)
Parameters
index
int0-based index of the field when reading or writing headerless CSV.
Exceptions
Properties
Index
0-based index of the field when reading or writing headerless CSV.
Indexes must be unique within a type.
public int Index { get; }