Conversions::ChangeType Method (Object^, Type^)

 

Converts an object to the specified type.

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

public:
static Object^ ChangeType(
	Object^ Expression,
	Type^ TargetType
)

Parameters

Expression
Type: System::Object^

The object to convert.

TargetType
Type: System::Type^

The type to which to convert the object.

Return Value

Type: System::Object^

An object of the specified target type.

Universal Windows Platform
Available since 8
.NET Framework
Available since 2.0
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone
Available since 8.1
Return to top
Show: