QuickOPC User's Guide and Reference
DefaultConvertToTarget Method



OpcLabs.BaseLib Assembly > OpcLabs.BaseLib.ComponentModel.Linking Namespace > LinkingTarget Class : DefaultConvertToTarget Method
The value to be converted.
The source type.
The destinationType.
Performs conversion of linked value to the target type, when there is no Converter or StringFormat specified.
Syntax
'Declaration
 
<CanBeNullAttribute()>
Protected Shared Function DefaultConvertToTarget( _
   ByVal value As Object, _
   ByVal sourceType As Type, _
   ByVal destinationType As Type _
) As Object
'Usage
 
Dim value As Object
Dim sourceType As Type
Dim destinationType As Type
Dim value As Object
 
value = LinkingTarget.DefaultConvertToTarget(value, sourceType, destinationType)
[CanBeNull()]
protected static object DefaultConvertToTarget( 
   object value,
   Type sourceType,
   Type destinationType
)
[CanBeNull()]
protected:
static Object^ DefaultConvertToTarget( 
   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
Attempts to use an implicit conversion. If not available, attempts to use the type converter for the source type or the destination type.
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