Level CompareTo Method | Apache log4net™ SDK Documentation

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

Namespace: log4net.Core
Assembly: log4net (in log4net.dll) Version: 2.0.8.0-.NET 4.0
Syntax

C#
VB
C++
F#
Copy

    public int CompareTo(
    	Object r
    )

    Public Function CompareTo (
    	r As Object
    ) As Integer

    public:
    virtual int CompareTo(
    	Object^ r
    ) sealed

    abstract CompareTo :
            r : Object -> int
    override CompareTo :
            r : Object -> int

#### Parameters

r
  Type: System
  Object
  A Level instance or
  to compare with this instance.

#### Return Value

Type: Int32
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 .

#### Implements

IComparable
CompareTo(Object)
Exceptions

Exception | Condition
--- | ---
ArgumentException | r is not a Level.

Remarks

r must be an instance of Level or
; otherwise, an exception is thrown.

See Also

#### Reference

Level Class
log4net.Core Namespace