CsvPropertyNameAttribute Class

Sets the name of the column of a property or a field. It takes precedence over CsvSerializerOptions.PropertyNamingPolicy.

[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false)]
public sealed class CsvPropertyNameAttribute : CsvAttribute
Inheritance
CsvAttribute CsvPropertyNameAttribute

Constructors

NameDescription
CsvPropertyNameAttribute(string)Sets the name of the column of a property or a field. It takes precedence over CsvSerializerOptions.PropertyNamingPolicy.

CsvPropertyNameAttribute(string)

CsvPropertyNameAttribute.cs

Sets the name of the column of a property or a field. It takes precedence over CsvSerializerOptions.PropertyNamingPolicy.

public CsvPropertyNameAttribute(string name)

Parameters

name string
The name of the column.

Properties

NameDescription
NameGets the name of the column.

Gets the name of the column.

public string Name { get; }

Property value

string