System.Rtti.TValue.IsType

De RAD Studio API Documentation
Aller à : navigation, rechercher

Delphi

function IsType<T>(const EmptyAsAnyType: Boolean = True): Boolean; overload; inline;
function IsType(ATypeInfo: PTypeInfo; const EmptyAsAnyType: Boolean = True): Boolean; overload;

C++

bool __fastcall TValue::IsType(const bool EmptyAsAnyType)/* overload */
bool __fastcall IsType(System::Typinfo::PTypeInfo ATypeInfo, const bool EmptyAsAnyType = true)/* overload */;

Propriétés

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

Description

Vérifie si la valeur actuellement stockée peut être transtypé en un type donné.

Appelez IsType pour vérifier si la valeur stockée est du type donné. IsType requiert le paramètre ATypeInfo, qui représente l'information de type du type à vérifier. IsType renvoie true si la valeur stockée est du type vérifié, et false sinon.

Le variant générique de cette méthode ne requièrt pas de paramètres, car elle obtient les informations PTypeInfo de manière interne.

Voir aussi