Namespace
CsvHelper
Assembly
CsvHelper.dll
Inheritance
object Attribute CsvDefaultAttribute
Builds
net10.0 netstandard2.1 netstandard2.0 net47

Remarks

The value must be a constant that converts implicitly to the member's type, or null for a reference type or a Nullable<T>. A column that is missing from the header is a different case, which CsvColumnAttribute.Optional handles.

Constructors

CsvDefaultAttribute(object)

Added in v34.0.0
public CsvDefaultAttribute(object? value)

Gives the member value when its field is empty.

Parameters

valueobject?
The value of an empty field.

View source

Properties

Value

Added in v34.0.0
public object? Value { get; }

The value of an empty field.

Property value

object?

View source