Npgsql Api Docs |

# NpgsqlInterval.CompareTo Method (Object)

Compares this instance with another/

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

#### Parameters

other
  An object to compare this with.

#### Return Value

0 if the argument is an NpgsqlInterval and the instances are equal or equivalent. A value less than zero if the argument is an NpgsqlInterval and this instance is less than the argument. A value greater than zero if the argument is an NpgsqlInterval and this instance is greater than the instance.

#### Implements

IComparable.CompareTo

#### Exceptions

Exception Type | Condition
--- | ---
ArgumentException | The argument is not an NpgsqlInterval.

#### See Also

NpgsqlInterval Class | NpgsqlTypes Namespace | NpgsqlInterval.CompareTo Overload List