CsvEnumNameAttribute(params string[])
Added in v34.0.0
public CsvEnumNameAttribute(params string[] names)Reads each of names as this enum member.
Parameters
namesstring[]- The other names of the enum member.
Attribute in CsvHelper
Gives a member of an enum other names that the members of CsvRecordAttribute types and Parse<T> of the reader read as it, such as "on hold" for OnHold. Its own name still matches.
[AttributeUsage(AttributeTargets.Field)]
public sealed class CsvEnumNameAttribute : AttributeCsvHelperCsvHelper.dllThe names are matched like the members' own names: ignoring ASCII case, unless two names of the enum differ only in case. They match whole fields only, not the parts of a list of flags.
public CsvEnumNameAttribute(params string[] names)Reads each of names as this enum member.
namesstring[]public CsvEnumNameAttribute(string name)Reads name as this enum member.
namestringpublic IReadOnlyList<string> Names { get; }The other names of the enum member.