DataConverterGetConverter Method |
Returns a function that will convert a value from one type to another.
Namespace: Demo3D.PLC.CommsAssembly: PLC (in PLC.dll) Version: 19.00.00
Syntaxpublic 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
ConversionDelegateA 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