Compare To(Object) Method
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Compares the current instance with another object of the same type.
public: virtual int CompareTo(System::Object ^ obj);
public: int CompareTo(Platform::Object ^ obj);
int CompareTo(winrt::Windows::Foundation::IInspectable const & obj);
public int CompareTo (object obj);
abstract member CompareTo : obj -> int override this.CompareTo : obj -> int
Public Function CompareTo (obj As Object) As Integer
An object to compare with this instance.
A 32-bit signed integer that indicates the relative order of the comparands. The return value has these meanings: Value Meaning 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.
obj has a different type
than this instance's BaseObject or if the BaseObject does not implement IComparable.