When reading, is used to get the field
at the index of the name if there was a
header specified. It will look for the
first name match in the order listed.
When writing, sets the name of the
field in the header record.
The first name will be used.
- 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["NameAttribute"]
class Type type-node
Syntax
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter, AllowMultiple = false, Inherited = true)]
public class NameAttribute : Attribute, IMemberMapper, IParameterMapper
Attributes
Type | Description |
---|---|
AttributeUsage |
Constructors
Name | Summary |
---|---|
NameAttribute |
When reading, is used to get the field at the index of the name if there was a header specified. It will look for the first name match in the order listed. When writing, sets the name of the field in the header record. The first name will be used. |
NameAttribute |
When reading, is used to get the field at the index of the name if there was a header specified. It will look for the first name match in the order listed. When writing, sets the name of the field in the header record. The first name will be used. |
Properties
Name | Property Type | Summary |
---|---|---|
Names | string[] |
Gets the names.
|
Methods
Name | Return Value | Summary |
---|---|---|
ApplyTo |
void |
Applies configuration to the given
MemberMap .
|
ApplyTo |
void |
Applies configuration to the given
ParameterMap .
|