System.VarCast
Delphi
procedure VarCast(var Dest: Variant; Source: Variant; VarType: Integer);
C++
extern void __fastcall  VarCast(Variant &dest, const Variant& source, int type);
Properties
| Type | Visibility | Source | Unit | Parent | 
|---|---|---|---|---|
procedure function  | 
		public | System.pas sysvari.h  | 
        System | System | 
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.