Conversions.ChangeType(Object, Type) Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Convertit un objet dans le type spécifié.
public:
static System::Object ^ ChangeType(System::Object ^ Expression, Type ^ TargetType);
public static object ChangeType (object Expression, Type TargetType);
public static object? ChangeType (object? Expression, Type TargetType);
static member ChangeType : obj * Type -> obj
Public Shared Function ChangeType (Expression As Object, TargetType As Type) As Object
Paramètres
- Expression
- Object
Objet à convertir.
- TargetType
- Type
Type dans lequel convertir l'objet.
Retours
Objet du type cible spécifié.