Table of Contents

Class TypeConverterAttribute

Namespace
CsvHelper.Configuration.Attributes
Assembly
CsvHelper.dll

Specifies the TypeConverter to use when converting the member to and from a CSV field.

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

Constructors

TypeConverterAttribute(Type)

Specifies the TypeConverter to use when converting the member to and from a CSV field.

public TypeConverterAttribute(Type typeConverterType)

Parameters

typeConverterType Type

The type of the ITypeConverter.

TypeConverterAttribute(Type, params object[])

Specifies the TypeConverter to use when converting the member to and from a CSV field.

public TypeConverterAttribute(Type typeConverterType, params object[] constructorArgs)

Parameters

typeConverterType Type

The type of the ITypeConverter.

constructorArgs object[]

Type constructor arguments for the type converter.

Properties

TypeConverter

Gets the type converter.

public ITypeConverter TypeConverter { get; }

Property Value

ITypeConverter

Methods

ApplyTo(MemberMap)

public void ApplyTo(MemberMap memberMap)

Parameters

memberMap MemberMap

ApplyTo(ParameterMap)

public void ApplyTo(ParameterMap parameterMap)

Parameters

parameterMap ParameterMap