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

Définition

Convertit un objet d'un type de d'objet en un autre. Cette classe est obsolète. Utilisez la classe Convert et la méthode Format(String, Object) à sa place.

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 à convertir en value.

formatString
String

La chaîne de format à appliquer pendant la conversion.

Retours

Object

Objet converti.

Exceptions

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

S’applique à