FormatterConverter.Convert FormatterConverter.Convert FormatterConverter.Convert Method

Definition

Converts a value to a given type.

Overloads

Convert(Object, Type) Convert(Object, Type) Convert(Object, Type)

Converts a value to the given Type.

Convert(Object, TypeCode) Convert(Object, TypeCode) Convert(Object, TypeCode)

Converts a value to the given TypeCode.

Convert(Object, Type) Convert(Object, Type) Convert(Object, Type)

Converts a value to the given Type.

public:
 virtual System::Object ^ Convert(System::Object ^ value, Type ^ type);
public object Convert (object value, Type type);
abstract member Convert : obj * Type -> obj
override this.Convert : obj * Type -> obj

Parameters

value
Object Object Object

The object to convert.

type
Type Type Type

The Type into which value is converted.

Returns

The converted value or null if the type parameter is null.

Implements

Exceptions

Convert(Object, TypeCode) Convert(Object, TypeCode) Convert(Object, TypeCode)

Converts a value to the given TypeCode.

public:
 virtual System::Object ^ Convert(System::Object ^ value, TypeCode typeCode);
public object Convert (object value, TypeCode typeCode);
abstract member Convert : obj * TypeCode -> obj
override this.Convert : obj * TypeCode -> obj

Parameters

value
Object Object Object

The object to convert.

typeCode
TypeCode TypeCode TypeCode

The TypeCode into which value is converted.

Returns

The converted value, or null if the type parameter is null.

Implements

Exceptions

Applies to