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 en type spécifié.
public:
static System::Object ^ ChangeType(System::Object ^ Expression, Type ^ TargetType);
public static object ChangeType(object Expression, Type TargetType);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The Expression origin object cannot be statically analyzed and may be trimmed")]
public static object? ChangeType(object? Expression, Type TargetType);
public static object? ChangeType(object? Expression, Type TargetType);
static member ChangeType : obj * Type -> obj
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The Expression origin object cannot be statically analyzed and may be trimmed")>]
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 vers lequel convertir l’objet.
Retours
Objet du type cible spécifié.
- Attributs