System.Rtti.TValue.TryAsType

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function TryAsType<T>(out AResult: T; const EmptyAsAnyType: Boolean = True): Boolean;

C++

bool __fastcall TValue::TryAsType(/* out */ T &AResult, const bool EmptyAsAnyType)

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.

See Also