log4net SDK Reference

Level.CompareTo Method 

Compares this instance to a specified object and returns an indication of their relative values.

[Visual Basic]
NotOverridable Public Function CompareTo( _
   ByVal r As Object _
) As Integer _
    Implements IComparable.CompareTo
[C#]
public int CompareTo(
   object r
);

Parameters

r
A Level instance or a null reference (Nothing in Visual Basic) to compare with this instance.

Return Value

A 32-bit signed integer that indicates the relative order of the values compared. The return value has these meanings:

Value Meaning
Less than zero This instance is less than r.
Zero This instance is equal to r.
Greater than zero

This instance is greater than r.

-or-

r is a null reference (Nothing in Visual Basic).

Implements

IComparable.CompareTo

Remarks

r must be an instance of Level or a null reference (Nothing in Visual Basic); otherwise, an exception is thrown.

Exceptions

Exception TypeCondition
ArgumentExceptionr is not a Level.

See Also

Level Class | log4net.Core Namespace