EasyUA Reference
Cast(Object,TypeInfo,BuiltInType) Method
See Also  Send Feedback
Opc.Ua.Core.Net4 Assembly > Opc.Ua Namespace > TypeInfo Class > Cast Method : Cast(Object,TypeInfo,BuiltInType) Method

source
The instance of a source value.
sourceType
Type of the source.
targetType
Type of the target.

Glossary Item Box

Casts a value to the specified target type.

Syntax

Visual Basic (Usage)Copy Code
Dim source As Object
Dim sourceType As TypeInfo
Dim targetType As BuiltInType
Dim value As Object
 
value = TypeInfo.Cast(source, sourceType, targetType)

Parameters

source
The instance of a source value.
sourceType
Type of the source.
targetType
Type of the target.

Return Value

Return casted value.

Exceptions

ExceptionDescription
System.InvalidCastExceptionif imposible to cast.

Requirements

Target Platforms: Windows 7/8/10, Windows Server 2003/2008/2012/2015, .NET4.x

See Also

Copyright © 2018 Advosol Inc. All Rights Reserved.