Table of Contents

Class EnumerableConverter

Namespace
CsvHelper.TypeConversion
Assembly
CsvHelper.dll

Throws an exception when used. This is here so that it's apparent that there is no support for IEnumerable type conversion. A custom converter will need to be created to have a field convert to and from an IEnumerable.

public class EnumerableConverter : DefaultTypeConverter, ITypeConverter
Inheritance
EnumerableConverter
Implements
Inherited Members

Constructors

EnumerableConverter()

public EnumerableConverter()

Methods

ConvertFromString(string?, IReaderRow, MemberMapData)

Throws an exception.

public override object? ConvertFromString(string? text, IReaderRow row, MemberMapData memberMapData)

Parameters

text string

The string to convert to an object.

row IReaderRow

The IReaderRow for the current record.

memberMapData MemberMapData

The MemberMapData for the member being created.

Returns

object

The object created from the string.

ConvertToString(object?, IWriterRow, MemberMapData)

Throws an exception.

public override string? ConvertToString(object? value, IWriterRow row, MemberMapData memberMapData)

Parameters

value object

The object to convert to a string.

row IWriterRow

The IWriterRow for the current record.

memberMapData MemberMapData

The MemberMapData for the member being written.

Returns

string

The string representation of the object.