AFObjectCompareTo Method (AFObject)
public int CompareTo( AFObject obj )
Public Function CompareTo ( obj As AFObject ) As Integer Dim instance As AFObject Dim obj As AFObject Dim returnValue As Integer returnValue = instance.CompareTo(obj)
public: virtual int CompareTo( AFObject^ obj ) sealed
abstract CompareTo : obj : AFObject -> int override CompareTo : obj : AFObject -> int
A 32-bit signed integer that indicates the relative order of the comparands. The return value has these meanings:
|Less than zero||This instance is less than obj.|
|Zero||This instance is equal to obj.|
|Greater than zero||This instance is greater than obj.|
|ArgumentException||The obj parameter is not the same type as this instance.|
By definition, any object compares greater than and two null references compare equal to each other.
This method uses the names of the objects to perform the comparison operation if the object has a Name property. Otherwise, the ID property is used for the comparison.