Table of Contents

Class CsvHeaderAttribute

Namespace
FlameCsv.Attributes
Assembly
FlameCsv.Core.dll

Configures the header name 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 CsvHeaderAttribute : CsvFieldConfigurationAttribute
Inheritance
object
CsvHeaderAttribute
Inherited Members

Constructors

CsvHeaderAttribute()

Initializes a new instance of the CsvHeaderAttribute class.

public CsvHeaderAttribute()

CsvHeaderAttribute(string?)

Initializes a new instance of the CsvHeaderAttribute class.

public CsvHeaderAttribute(string? value)

Parameters

value string

Header value used when reading or writing CSV.

CsvHeaderAttribute(string?, params string[])

Initializes a new instance of the CsvHeaderAttribute class.

public CsvHeaderAttribute(string? value, params string[] aliases)

Parameters

value string

Header value used when reading or writing CSV.

aliases string[]

Additional values that can be used to match the header when reading CSV.

Properties

Aliases

Additional values that can be used to match the header when reading CSV. Value is always used when writing.

public string[] Aliases { get; init; }

Property Value

string[]

Value

Header value used when reading or writing CSV. If null, the member or parameter name is used as the header value (the default).

public string? Value { get; set; }

Property Value

string