DynamicPropertyValue Property

Gets or sets the value of the dynamic property.

Definition

Namespace: FolkerKinzel.CsvTools.Mappings
Assembly: FolkerKinzel.CsvTools.Mappings (in FolkerKinzel.CsvTools.Mappings.dll) Version: 1.1.0+1263e8243dc2cd78095f678f813d7d9c52ea4315
C#
public abstract Object? Value { get; set; }

Property Value

Object

Remarks

If the containing CsvMapping instance is assigned to a dynamic variable, the runtime will do all the required casting operations automatically.

For high-performance scenarios you can do without the convenience of dynamic properties and perform the type cast yourself with AsITypedPropertyT(DynamicProperty). (This allows you to process value types without boxing and unboxing.)

Exceptions

InvalidOperationExceptionRecord is null. Assign a CsvRecord instance to the containing CsvMapping before accessing this property.
InvalidCastException

When setting the value, value is null and AcceptsNull is false,

- or -

value does not match the expected data type.

FormatException

When getting the value, parsing fails and Throwing is true.

- or -

When setting the value, the converter uses an invalid format string.

See Also