System.VarCast
From RAD Studio VCL Reference
Contents |
Delphi Information
From System.pas
procedure VarCast(var Dest: Variant; Source: Variant; VarType: Integer);
Unit: System
Type: procedure
Visibility: public
C++ Information
From System.hpp
void __fastcall VarCast(System::Variant & dest, const System::Variant & source, int type);
Unit: System
Type: function
Description
Converts a variant to a specified type.
VarCast converts a variant to a specified type and returns a new Variant that has the specified type. The following table describes the parameters expected by the VarCast routine.
| Parameter | Description |
|---|---|
|
Dest |
The resulting variant. Dest contains the converted value. |
|
Source |
The variant that contains the input value. |
|
VarType |
The type of the new variant. |
Note: An exception is raised if the conversion is not possible.