RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
VarHlpr.VariantCast Function

Performs a type-cast on a Variant.

Pascal
procedure VariantCast(const src: Variant; var dst: Variant; vt: Integer);
C++
VariantCast(const Variant src, Variant dst, int vt);

VariantCast type-casts src to the desired type and returns the resulted Variant as dst. vt is a value which identifies the type of the destination Variant.  

An EVariantTypeCastError exception will be raised if the source cannot be type-casted to the desired type. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!