Click or drag to resize

DataConverterGetConverter Method

Returns a function that will convert a value from one type to another.

Namespace: Demo3D.PLC.Comms
Assembly: PLC (in PLC.dll) Version: 19.00.00
Syntax
C#
public static ConversionDelegate GetConverter(
	IDataContextProvider? contextProvider,
	DataType expectedSourceType,
	DataType destinationType
)

Parameters

contextProvider  IDataContextProvider
The context of conversions.
expectedSourceType  DataType
The expected source data type of the value.
destinationType  DataType
The data type of the value to return.

Return Value

ConversionDelegate
A function that will convert a value from one type to another.
Remarks
The value passed to the conversion function is expected to be expectedSourceType, but the conversion will still be attempted if it's a different type.
See Also