OPC Studio User's Guide and Reference
ConvertFromTarget Method



OpcLabs.BaseLib Assembly > OpcLabs.BaseLib.ComponentModel.Linking Namespace > LinkingTarget Class : ConvertFromTarget Method
The value to be converted.

The value of this parameter can be null (Nothing in Visual Basic).

The source type.

The value of this parameter cannot be null (Nothing in Visual Basic).

The destinationType.

The value of this parameter cannot be null (Nothing in Visual Basic).

Performs conversion from the target type to the linked value.
Syntax
'Declaration
 
<CanBeNullAttribute()>
Protected Overridable Function ConvertFromTarget( _
   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.ConvertFromTarget(value, sourceType, destinationType)
[CanBeNull()]
protected virtual object ConvertFromTarget( 
   object value,
   Type sourceType,
   Type destinationType
)
[CanBeNull()]
protected:
virtual Object^ ConvertFromTarget( 
   Object^ value,
   Type^ sourceType,
   Type^ destinationType
) 

Parameters

value
The value to be converted.

The value of this parameter can be null (Nothing in Visual Basic).

sourceType
The source type.

The value of this parameter cannot be null (Nothing in Visual Basic).

destinationType
The destinationType.

The value of this parameter cannot be null (Nothing in Visual Basic).

Return Value

The converted value.

This method can return null (Nothing in Visual Basic).

Remarks
When a Converter is specified, the conversion is performed using the converter, and a follow-up implicit conversion.
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