ObjectConverter.ConvertValue(Object, Type, String) Yöntem

Tanım

Bir nesneyi bir nesne türünden başka bir nesne türüne dönüştürür. Bu sınıf artık kullanılmıyor. Convert Format(String, Object) Bunun yerine sınıfını ve yöntemini kullanın.

Bu API, ürün altyapısını destekler ve doğrudan kodunuzdan kullanıma yönelik değildir.

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

Parametreler

value
Object

Dönüştürülecek nesne.

toType
Type

Öğesine Type dönüştürülecek value .

formatString
String

Dönüştürme sırasında uygulanacak biçim dizesi.

Döndürülenler

Object

Dönüştürülen nesne.

Özel durumlar

ValuetoTypeBu yöntemle türe dönüştürülemiyor.

Şunlara uygulanır