Table of Contents

Class ConstantAttribute

Namespace
CsvHelper.Configuration.Attributes
Assembly
CsvHelper.dll

The constant value that will be used for every record when reading and writing. This value will always be used no matter what other mapping configurations are specified.

[AttributeUsage(AttributeTargets.Property|AttributeTargets.Field|AttributeTargets.Parameter, AllowMultiple = false, Inherited = true)]
public class ConstantAttribute : Attribute, IMemberMapper, IParameterMapper
Inheritance
ConstantAttribute
Implements
Inherited Members

Constructors

ConstantAttribute(object)

The constant value that will be used for every record when reading and writing. This value will always be used no matter what other mapping configurations are specified.

public ConstantAttribute(object constant)

Parameters

constant object

The constant.

Properties

Constant

Gets the constant.

public object Constant { get; }

Property Value

object

Methods

ApplyTo(MemberMap)

public void ApplyTo(MemberMap memberMap)

Parameters

memberMap MemberMap

ApplyTo(ParameterMap)

public void ApplyTo(ParameterMap parameterMap)

Parameters

parameterMap ParameterMap