Partager via


ListColumn<TBusinessObject>.IComparer.Compare Method (Object, Object)

 

Compares two objects and returns a value indicating whether one is less than, equal to, or greater than the other.

Namespace:   Microsoft.WindowsServerSolutions.Administration.ObjectModel
Assembly:  Microsoft.WindowsServerSolutions.Administration.ObjectModel (in Microsoft.WindowsServerSolutions.Administration.ObjectModel.dll)

Syntax

int IComparer.Compare(
    object x,
    object y
)
private:
virtual int Compare(
    Object^ x,
    Object^ y
) sealed = IComparer::Compare
Private Function Compare (
    x As Object,
    y As Object
) As Integer
    Implements IComparer.Compare

Parameters

Return Value

Type: System.Int32

An integer that indicates the result of the comparison.

Value

Condition

Less than zero

x is less than y

Zero

x equals y

Greater than zero

x is greater than y

Implements

IComparer.Compare(Object, Object)

Exceptions

Exception Condition
ArgumentException

x or y is of a type that cannot be cast to type TBusinessObject. -or- x and y do not implement either the IComparable generic interface or the IComparable interface.

Remarks

For more information, see Comparer<T>.

TBusinessObject represents a business object that encapsulates information and methods that relate to business data or business functionality. The information in the business object is exposed as properties.

See Also

ListColumn<TBusinessObject> Class
Microsoft.WindowsServerSolutions.Administration.ObjectModel Namespace

Return to top