IndexAttribute Class
When reading, is used to get the field at the given index. When writing, the fields will be written in the order of the field indexes.
Namespace
CsvHelper.Configuration.Attributes
Interfaces
Base Types
  • Attribute
graph BT Type-->Base0["Attribute"] Type-.->Interface0["IMemberMapper"] click Interface0 "/CsvHelper/api/CsvHelper.Configuration.Attributes/IMemberMapper" Type-.->Interface1["IParameterMapper"] click Interface1 "/CsvHelper/api/CsvHelper.Configuration.Attributes/IParameterMapper" Type["IndexAttribute"] class Type type-node

Syntax

[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter, AllowMultiple = false, Inherited = true)]
public class IndexAttribute : Attribute, IMemberMapper, IParameterMapper

Attributes

Type Description
AttributeUsage

Constructors

Name Summary
IndexAttribute(int, int) When reading, is used to get the field at the given index. When writing, the fields will be written in the order of the field indexes.

Properties

Name Property Type Summary
Index int
Gets the index.
IndexEnd int
Gets the index end.

Methods

Name Return Value Summary
ApplyTo(MemberMap) void
Applies configuration to the given MemberMap.
ApplyTo(ParameterMap) void
Applies configuration to the given ParameterMap.