System.Rtti.TValue.AsType
Delphi
function AsType<T>(const EmptyAsAnyType: Boolean = True): T; overload;
procedure AsType(ATypeInfo: PTypeInfo; out AResult; const EmptyAsAnyType: Boolean = True); overload;
C++
T __fastcall TValue::AsType(const bool EmptyAsAnyType)
void __fastcall AsType(System::Typinfo::PTypeInfo ATypeInfo, /* out */ void *AResult, const bool EmptyAsAnyType = true)/* overload */;
Propriétés
Type | Visibilité | Source | Unité | Parent |
---|---|---|---|---|
function | public | System.Rtti.pas SystemRtti.h |
System.Rtti | TValue |
Description
Transtype la valeur actuellement stockée en un autre type.
Appelez AsType pour convertir la valeur stockée en un autre type. AsType renvoie la valeur nouvelle, convertie, si la conversion a réussi ; sinon, une exception est déclenchée.
Voir aussi