CsvConstructorArguments Class

The values of the constructor parameters of a record, passed to CsvObjectInfoValues<T>.ObjectWithParameterizedConstructorCreator.

public sealed class CsvConstructorArguments

Remarks

The values are kept in typed slots, reused for every record, so that the values of value types are not boxed.

Properties

NameDescription
CountGets the number of parameters.

Gets the number of parameters.

public int Count { get; }

Property value

int

Methods

NameDescription
GetValue<TValue>(int)Gets the value of a parameter: the value read from the record, or the default value of the parameter when the record has no value for it.

GetValue<TValue>(int)

CsvConstructorArguments.cs

Gets the value of a parameter: the value read from the record, or the default value of the parameter when the record has no value for it.

public TValue GetValue<TValue>(int index)

Type parameters

TValue
The type of the parameter.

Parameters

index int
The position of the parameter.

Returns

TValue The value of the parameter.

Exceptions

InvalidCastException
TValue is not the type of the parameter.