System.Variants.VarIsType

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function VarIsType(const V: Variant; AVarType: TVarType): Boolean;
function VarIsType(const V: Variant; const AVarTypes: array of TVarType): Boolean;

C++

extern DELPHI_PACKAGE bool __fastcall VarIsType(const System::Variant &V, System::TVarType AVarType)/* overload */;

Properties

Type Visibility Source Unit Parent
function public
System.Variants.pas
System.Variants.hpp
System.Variants System.Variants

Description

Indicates whether the specified variant represents a specified type.

VarIsType checks whether the type code for the Variant specified by V matches the specified type code or one of the type codes in the specified array.

V is the Variant to check.

AVarType is the type code against which to check V.

AVarTypes is an array of valid type codes against which to check V.

AVarTypes_size is the index of the last entry in AVarTypes (one less than the number of entries).

VarIsType returns true if the given variant's type code matches the supplied type code or codes, false otherwise.

See Also