System.Rtti.TValue.TryAsType
Delphi
function TryAsType<T>(out AResult: T): Boolean;
C++
bool __fastcall TValue::TryAsType(/* out */ T &AResult)
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | System.Rtti.pas SystemRtti.h |
System.Rtti | TValue |
Description
Tries to cast the currently stored value to another type.
Call TryAsType to try to convert the stored value to another type. TryCast requires one out parameter, AResult, in which the casted value will be placed. TryAsType returns true if the conversion succeeded, and false otherwise.