RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
Variants.FindCustomVariantType Function

Retrieves the object that implements a custom System::Variant type.

Pascal
function FindCustomVariantType(const AVarType: TVarType; out CustomVariantType: TCustomVariantType): Boolean; overload;
function FindCustomVariantType(const TypeName: string; out CustomVariantType: TCustomVariantType): Boolean; overload;
C++
Boolean FindCustomVariantType(const TVarType AVarType, TCustomVariantType CustomVariantType);
Boolean FindCustomVariantType(const AnsiString TypeName, TCustomVariantType CustomVariantType);

Use FindCustomVariantType to obtain a reference to the object that implements a custom System::Variant type. 

TypeName is the name of the TCustomVariantType descendant class you want to retrieve. 

AVarType is the type code of System::Variant whose implementation class you want to retrieve. If you have an instance of a System::Variant whose value is a custom System::Variant Type, you can obtain a value for this parameter using the VarType function. 

CustomVariantType returns an instance of the TCustomVariantType descendant that implements the indicated custom System::Variant type. 

 

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