Click or drag to resize
ComplexCompareTo Method (Object)
Compares this Complex to another Object.

Namespace: Imsl.Math
Assembly: ImslCS (in ImslCS.dll) Version: 6.5.2.0
Syntax
public int CompareTo(
	Object obj
)

Parameters

obj
Type: SystemObject
An Object to be compared.

Return Value

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

IComparableCompareTo(Object)
Exceptions
ExceptionCondition
InvalidCastException is thrown if obj is not a Complex 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).

See Also