System.Rtti.TRttiType.GetFields
Delphi
function GetFields: TArray<TRttiField>; virtual;
C++
virtual System::DynamicArray<TRttiField*> __fastcall GetFields();
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | System.Rtti.pas System.Rtti.hpp |
System.Rtti | TRttiType |
Description
Returns a list of all the fields that are part of the reflected type.
Use the GetFields method to obtain a list of all the fields (variables) that are members of the reflected type. Although GetFields is declared in TRttiType, it only works in RTTI objects describing types that actually allow fields, such as records and classes; for all other types, this method simply returns an empty array.
The list returned by GetFields is ordered by the class/interface hierarchy. This means that the most recently included fields are located at the top of the list.
See Also
Code Examples