CsvCultureAttribute(string)
Added in v34.0.0
public CsvCultureAttribute(string name)Reads the member with the culture called name.
Parameters
namestring- The name of the culture, such as
"de-DE";""is the invariant culture.
Attribute in CsvHelper
Reads a member of a CsvRecordAttribute type with the given culture instead of the reader's CsvReaderOptions.FormatProvider, for files whose columns use different number or date formats.
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter)]
public sealed class CsvCultureAttribute : AttributeCsvHelperCsvHelper.dllThe culture is looked up with CultureInfo.GetCultureInfo(string) when a mapper is created, so an unknown name (or any name but the invariant culture's in an app that runs in globalization invariant mode) throws a CultureNotFoundException there.
public CsvCultureAttribute(string name)Reads the member with the culture called name.
namestring"de-DE"; "" is the invariant culture.public string Name { get; }The name of the culture.