ObjectConverter.ConvertValue(Object, Type, String) Méthode

Définition

Convertit un objet d’un type d’objet en un autre type d’objet. Cette classe est obsolète. Utilisez plutôt la Convert classe et la Format(String, Object) méthode.

Cette API prend en charge l'infrastructure du produit et n'est pas destinée à être utilisée directement à partir de votre code.

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

Paramètres

value
Object

Objet à convertir.

toType
Type

Type À convertirvalue.

formatString
String

Chaîne de format à appliquer pendant la conversion.

Retours

Objet converti.

Exceptions

Value ne peut pas être converti en type toType avec cette méthode.

S’applique à