Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

OrderComparator.Compare Method

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

[Visual Basic]
Public Overridable Sub Compare( _
   ByVal o1 As Object, _
   ByVal o2 As Object _
) _
    Implements IComparer.Compare
[C#]
public virtual int Compare(
   object o1,
   object o2
);

Parameters

o1
The first object to compare.
o2
The second object to compare.

Return Value

-1 if first object is less then second, 1 if it is greater, or 0 if they are equal.

Implements

IComparer.Compare

Remarks

Uses direct evaluation instead of CompareTo to avoid unnecessary boxing.

See Also

OrderComparator Class | Spring.Core Namespace