[Overview][Types][Classes][Procedures and functions][Index] | Reference for unit 'ImgList' (#lcl)

# TCustomImageList.Equals

Compares the contents of the image lists.

## Declaration

Source position: imglist.pp line 338

`public function TCustomImageList.Equals(`
`Obj: TObject`
`):Boolean; override;`

## Arguments

`Obj` |  | The image list object used for the comparison.

## Function result

True when the image lists are equivalent.

## Description

Equals is an overridden Boolean function used to compare the content in the image list to another TCustomImageList class instance. Equals re-implements the method defined in TObject to determine object equivalence.

Obj is a TObject instance used in the comparison. Obj must be a TCustomImageList descendant in the method; the inherited method is called when it is not derived from TCustomImageList.

This is an expensive operation. Both image lists are written to memory streams using WriteData and WriteAdvData, and the streams are then compared on a byte-by-byte basis.

The return value is True when the memory used in both streams has identical content.

## See also

TCustomImageList.WriteData |  | Writes image data for the default resolution to a stream.
TCustomImageList.WriteAdvData |  | Writes the image content for multiple resolutions to the specified stream.