Show: Delphi C++
Display Preferences

System.TObject.Equals

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function Equals(Obj: TObject): Boolean; virtual;

C++

virtual bool __fastcall Equals(TObject* Obj);

Properties

Type Visibility Source Unit Parent
function public
System.pas
systobj.h
System TObject

Description

Checks whether the current instance and the Obj parameter are equal.

The function has one Obj parameter of the TObject type.

By default, the Equals method shows whether the addresses corresponding to the current object and the Obj object are identical. The method returns a boolean value that represents the equality between the two addresses.

Note: Equals is supposed to be overridden in user-derived classes, to provide consumer objects with an equality determining function. For example, in the FMX.Types.TBounds class, Equals also returns True if the Rect properties of the current object and of the Obj object are equal. In the FMX.StdActns.TBaseValueRange class, Equals also returns True if all the properties of the current object and of the Obj object are equal.

See Also

Personal tools
In Other Languages
Previous Versions
Assistance