Compares this Complex to another Object.

Namespace: Imsl.Math
Assembly: ImslCS (in ImslCS.dll) Version: 6.5.0.0

Syntax

C#
public int CompareTo(
	Object obj
)
Visual Basic (Declaration)
Public Function CompareTo ( _
	obj As Object _
) As Integer
Visual C++
public:
virtual int CompareTo(
	Object^ obj
) sealed

Parameters

obj
Type: System..::.Object
An Object to be compared.

Return Value

An int, 0 if obj is equal to this Complex; a value less than 0 if this Complex is less than obj; and a value greater than 0 if this Complex is greater than obj.

Implements

IComparable..::.CompareTo(Object)

Remarks

If the Object is a Complex, this function behaves like compareTo(Complex). Otherwise, it throws a InvalidCastException (as Complex objects are comparable only to other Complex objects).

Exceptions

ExceptionCondition
System..::.InvalidCastException is thrown if obj is not a Complex object

See Also