Share via


DropDownMember.CompareTo Method

Definition

Overloads

CompareTo(Object)

Compares this object to the specified object.

CompareTo(Object, StringComparison)

Compares one CompareTo to another with the given string comparison.

CompareTo(Object)

Compares this object to the specified object.

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

Parameters

obj
Object

[in] The DropDownMember object to compare to.

Returns

1 if this object is greater than the specified object, 0 if this object equals the specified object, -1 if this object is less than the specified object.

Implements

Remarks

This method is an implementation of the CompareTo method on the IComparable interface.

The base method compares the labels of this object and the specified object but only if the specified object is a DropDownMember object. The result of the comparison is returned.

Applies to

CompareTo(Object, StringComparison)

Compares one CompareTo to another with the given string comparison.

public:
 int CompareTo(System::Object ^ obj, StringComparison stringComparison);
public int CompareTo (object obj, StringComparison stringComparison);
member this.CompareTo : obj * StringComparison -> int
Public Function CompareTo (obj As Object, stringComparison As StringComparison) As Integer

Parameters

obj
Object

The object to which to do the comparison.

Returns

If obj is a DropDownMember, the return value of a string comparison of the two; otherwise -1.

Applies to