QuickOPC User's Guide and Reference
ConvertToTarget Method



OpcLabs.BaseLib Assembly > OpcLabs.BaseLib.ComponentModel.Linking Namespace > LinkingTarget Class : ConvertToTarget Method
The value to be converted.
The source type.
The destinationType.
Performs conversion of linked value to the target type.
Syntax
'Declaration
 
<CanBeNullAttribute()>
Protected Overridable Function ConvertToTarget( _
   ByVal value As Object, _
   ByVal sourceType As Type, _
   ByVal destinationType As Type _
) As Object
'Usage
 
Dim instance As LinkingTarget
Dim value As Object
Dim sourceType As Type
Dim destinationType As Type
Dim value As Object
 
value = instance.ConvertToTarget(value, sourceType, destinationType)
[CanBeNull()]
protected virtual object ConvertToTarget( 
   object value,
   Type sourceType,
   Type destinationType
)
[CanBeNull()]
protected:
virtual Object^ ConvertToTarget( 
   Object^ value,
   Type^ sourceType,
   Type^ destinationType
) 

Parameters

value
The value to be converted.
sourceType
The source type.
destinationType
The destinationType.

Return Value

The converted value.
Remarks
When a Converter is specified, the value is converted using the converter first. After this step, when a StringFormat is specified, the string format is applied. A follow-up implicit conversion is attempted finally.
Requirements

Target Platforms: .NET Framework: Windows 10 (selected versions), Windows 11 (selected versions), Windows Server 2016, Windows Server 2022; .NET: Linux, macOS, Microsoft Windows

See Also