Class DefaultAttribute
- Namespace
- CsvHelper.Configuration.Attributes
- Assembly
- CsvHelper.dll
The default value that will be used when reading when the CSV field is empty.
[AttributeUsage(AttributeTargets.Property|AttributeTargets.Field|AttributeTargets.Parameter, AllowMultiple = false, Inherited = true)]
public class DefaultAttribute : Attribute, IMemberMapper, IParameterMapper
- Inheritance
-
DefaultAttribute
- Implements
- Inherited Members
Constructors
DefaultAttribute(object)
The default value that will be used when reading when the CSV field is empty.
public DefaultAttribute(object defaultValue)
Parameters
defaultValueobjectThe default value
Properties
Default
Gets the default value.
public object Default { get; }
Property Value
Methods
ApplyTo(MemberMap)
public void ApplyTo(MemberMap memberMap)
Parameters
memberMapMemberMap
ApplyTo(ParameterMap)
public void ApplyTo(ParameterMap parameterMap)
Parameters
parameterMapParameterMap