Conversions.ChangeType(Object, Type) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Converts an object to the specified type.
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
Parameters
- Expression
- Object
The object to convert.
- TargetType
- Type
The type to which to convert the object.
Returns
An object of the specified target type.
Applies to
Tee yhteistyötä kanssamme GitHubissa
Tämän sisällön lähde on GitHubissa, jossa voit myös luoda ja tarkastella ongelmia ja pull-pyyntöjä. Katso lisätietoja osallistujan oppaasta.