CompareTo( ) method (Collections)
- Last Updated: March 15, 2024
- 1 minute read
- OpenEdge
- Version 12.8
- Documentation
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
|
- 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.