AFObjectCompareTo Method (Object)
public virtual int CompareTo( Object obj )
Public Overridable Function CompareTo ( obj As Object ) As Integer Dim instance As AFObject Dim obj As Object Dim returnValue As Integer returnValue = instance.CompareTo(obj)
public: virtual int CompareTo( Object^ obj )
abstract CompareTo : obj : Object -> int override CompareTo : obj : Object -> 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.