The CompareTo() method returns a value indicating if a given object is less than, equal to, or greater than another object (for purposes of comparison for sorting).

Return type: INTEGER

Access: PUBLIC

Applies to: Progress.Collections.IComparable<T> interface

Syntax

CompareTo (otherObject AS T)
otherObject
The other object with which to compare the given object.
The following rules apply to the returned value of CompareTo():
  • If the returned value is less than 0 (zero), then the current object sorts before the object passed in.
  • If the returned value equals 0 (zero), then the current object occupies the same position in the sort order.
  • If the returned value is greater than 0 (zero), then the current object sorts after the object passed in.

See also

<T> Generic type reference. Compare( ) method (Collections)