System.Rtti.TValue.IsType

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function IsType<T>: Boolean; overload;
function IsType(ATypeInfo: PTypeInfo): Boolean; overload;

C++

bool __fastcall TValue::IsType(void)
bool __fastcall IsType(System::Typinfo::PTypeInfo ATypeInfo)/* overload */;

Properties

Type Visibility Source Unit Parent
function public
System.Rtti.pas
SystemRtti.h
System.Rtti TValue

Description

Checks whether the currently stored value can be casted to a given type.

Call IsType to check whether the stored value is of the given type. IsType requires one parameter, ATypeInfo, which represents the type information to check against. IsType returns true if the stored value is of the checked type, and false otherwise.

The generic variant of this method does not require any parameters, because is obtains the PTypeInfo information internally.

See Also