[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'Classes' (#rtl)


Callback to sort collection items


Source position: classesh.inc line 520

type TCollectionSortCompare = function(

  Item1: TCollectionItem;

  Item2: TCollectionItem



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



Sort the items in the collection

Documentation generated on: Jun 22 2020