ObjectConverter.ConvertValue(Object, Type, String) 方法

定义

将对象从一个对象类型转换为另一个对象类型。 此类已过时。 请改用 Convert 类和 Format(String, Object) 方法。

此 API 支持产品基础结构,不能在代码中直接使用。

public:
 static System::Object ^ ConvertValue(System::Object ^ value, Type ^ toType, System::String ^ formatString);
public static object ConvertValue(object value, Type toType, string formatString);
static member ConvertValue : obj * Type * string -> obj
Public Shared Function ConvertValue (value As Object, toType As Type, formatString As String) As Object

参数

value
Object

要转换的对象。

toType
Type

Type要转换为value的。

formatString
String

转换期间要应用的格式字符串。

返回

转换的对象。

例外

Value 无法使用此方法转换为类型 toType

适用于