Conversions.ChangeType(Object, Type) Metodo

Definizione

Converte un oggetto nel tipo specificato.

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

Parametri

Expression
Object

Oggetto da convertire.

TargetType
Type

Tipo in cui convertire l'oggetto.

Valori restituiti

Oggetto del tipo di destinazione specificato.

Attributi

Si applica a