CsvConverterContext Class

The context of the conversion of the values of a column.

public sealed class CsvConverterContext

Constructors

NameDescription
CsvConverterContext(CsvSerializerOptions, string?, string?)Initializes a new instance of the CsvConverterContext class.

CsvConverterContext(CsvSerializerOptions, string?, string?)

CsvConverterContext.cs

Initializes a new instance of the CsvConverterContext class.

public CsvConverterContext(CsvSerializerOptions options, string? format = null, string? memberName = null)

Parameters

options CsvSerializerOptions
The options of the serializer.
format string?
The format string of the column, or null for the default format.
memberName string?
The name of the member of the column, or null.

Properties

NameDescription
FormatGets the format string set with CsvFormatAttribute, or null for the default format.
FormatProviderGets the format provider: CsvSerializerOptions.FormatProvider, or CultureInfo.InvariantCulture.
MemberNameGets the name of the member of the column, or null.
OptionsGets the options of the serializer.

Gets the format string set with CsvFormatAttribute, or null for the default format.

public string? Format { get; }

Property value

string?

public IFormatProvider FormatProvider { get; }

Property value

IFormatProvider

Gets the name of the member of the column, or null.

public string? MemberName { get; }

Property value

string?

Gets the options of the serializer.

public CsvSerializerOptions Options { get; }

Property value

CsvSerializerOptions