IFormatterConverter.Convert 方法

定义

将值转换为给定的类型。Converts a value to a given type.

重载

Convert(Object, Type)

将值转换为给定的 TypeConverts a value to the given Type.

Convert(Object, TypeCode)

将值转换为给定的 TypeCodeConverts a value to the given TypeCode.

Convert(Object, Type)

将值转换为给定的 TypeConverts a value to the given Type.

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

参数

value
Object

要转换的对象。The object to be converted.

type
Type

Type 将转换成的 valueThe Type into which value is to be converted.

返回

转换后的 valueThe converted value.

Convert(Object, TypeCode)

将值转换为给定的 TypeCodeConverts a value to the given TypeCode.

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

参数

value
Object

要转换的对象。The object to be converted.

typeCode
TypeCode

TypeCode 将转换成的 valueThe TypeCode into which value is to be converted.

返回

转换后的 valueThe converted value.

适用于