Unit 'Classes' Package
[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] [#rtl]

TCollectionSortCompare

Callback to sort collection items.

Declaration

Source position: classesh.inc line 806

type TCollectionSortCompare = function(

  Item1: TCollectionItem;

  Item2: TCollectionItem

):Integer;

Description

TCollectionSortCompare is the prototype for a callback used in the TCollection.Sort method. The procedure should compare Item1 and Item2 and return an integer:

Result < 0
if Item1 comes before Item2
Result = 0
if Item1 is at the same level as Item2
Result > 0
if Item1 comes after Item2

See also

TCollection.Sort

  

Sort the items in the collection.


Documentation generated on: Dec 21 2024