DBConvert.ChangeType Method

Definition

Overloads

ChangeType(Object, Type)

This API supports the product infrastructure and is not intended to be used directly from your code.

Changes the specified value to the specified type.

ChangeType<T>(Object)

This API supports the product infrastructure and is not intended to be used directly from your code.

Changes the specified value to the current type.

ChangeType(Object, Type)

Changes the specified value to the specified type.

This API supports the product infrastructure and is not intended to be used directly from your code.

public:
 static System::Object ^ ChangeType(System::Object ^ value, Type ^ type);
public static object ChangeType (object value, Type type);
static member ChangeType : obj * Type -> obj
Public Shared Function ChangeType (value As Object, type As Type) As Object

Parameters

value
Object

The object to be converted.

type
Type

The type to convert the object to.

Returns

An object that contains the converted value of the specified type.

Remarks

Important

Calling this method with untrusted data is a security risk. Call this method only with trusted data. For more information, see Validate All Inputs.

Applies to

ChangeType<T>(Object)

Changes the specified value to the current type.

This API supports the product infrastructure and is not intended to be used directly from your code.

public:
generic <typename T>
 static T ChangeType(System::Object ^ value);
public static T ChangeType<T> (object value);
static member ChangeType : obj -> 'T
Public Shared Function ChangeType(Of T) (value As Object) As T

Type Parameters

T

The type to change to.

Parameters

value
Object

The object to be converted.

Returns

T

An object of the specified type that contains the converted value.

Remarks

Important

Calling this method with untrusted data is a security risk. Call this method only with trusted data. For more information, see Validate All Inputs.

Applies to