System.Rtti.TRttiType.GetField

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function GetField(const AName: string): TRttiField; virtual;

C++

virtual TRttiField* __fastcall GetField(const System::UnicodeString AName);

Properties

Type Visibility Source Unit Parent
function public
System.Rtti.pas
System.Rtti.hpp
System.Rtti TRttiType

Description

Returns an RTTI object for a field that is a member of the reflected type.

Use the GetField method to obtain an RTTI object for a field that is a member of the reflected type. Although GetField is declared in TRttiType, it only works in RTTI objects that describe types that actually allow fields, such as records and classes; for all other types, this method simply returns nil.

The Name parameter specifies the name of the field to find.

See Also