System.Variants.TCustomVariantType.VarDataCastTo

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure VarDataCastTo(var Dest: TVarData; const Source: TVarData;  const AVarType: TVarType); overload;
procedure VarDataCastTo(var Dest: TVarData; const AVarType: TVarType); overload;

C++

void __fastcall VarDataCastTo(TVarData &Dest, const TVarData &Source, const System::Word AVarType)/* overload */;
void __fastcall VarDataCastTo(TVarData &Dest, const System::Word AVarType)/* overload */;

Properties

Type Visibility Source Unit Parent
procedure
function
protected
System.Variants.pas
System.Variants.hpp
System.Variants TCustomVariantType

Description

Performs a cast from one Variant type to another.

Call VarDataCastTo from the implementation of a TCustomVariantType descendant to perform casts on the data from one Variant type to another. Do not use VarDataCastTo as the entire implementation of the CastTo method, as this will lead to a circular reference.

Dest returns the result of the cast. If VarDataCastTo is called with no Source parameter, it also provides the source data to be cast.

Source is the TVarData record to be cast.

VarType is the type code of the Variant type to which the data should be cast.

See Also