Conversions.ChangeType Method

Converts an object to the specified type.

Namespace:  Microsoft.VisualBasic.CompilerServices
Assembly:  Microsoft.VisualBasic (in Microsoft.VisualBasic.dll)


Public Shared Function ChangeType ( _
    Expression As Object, _
    TargetType As Type _
) As Object
public static Object ChangeType(
    Object Expression,
    Type TargetType


  • TargetType
    Type: System.Type
    The type to which to convert the object.

Return Value

Type: System.Object
An object of the specified target type.

Version Information


Supported in: 5, 4, 3


For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.