Rational.CompareTo Method (Rational)

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Compares a rational number to another rational number.

Namespace:  Microsoft.SolverFoundation.Common
Assembly:  Microsoft.Solver.Foundation (in Microsoft.Solver.Foundation.dll)

Syntax

'Declaration
Public Function CompareTo ( _
    rat As Rational _
) As Integer
public int CompareTo(
    Rational rat
)
public:
virtual int CompareTo(
    Rational rat
) sealed
abstract CompareTo : 
        rat:Rational -> int 
override CompareTo : 
        rat:Rational -> int 
public final function CompareTo(
    rat : Rational
) : int

Parameters

Return Value

Type: System.Int32
A 32-bit signed integer that indicates how the rational number compares to the other rational number. The return values are described in the following table.

Return value

Description

Less than zero

This object is less than the input.

Zero

This object is equivalent to the input.

Greater than zero

This object is greater than the input.

Implements

IComparable<T>.CompareTo(T)

.NET Framework Security

See Also

Reference

Rational Structure

CompareTo Overload

Microsoft.SolverFoundation.Common Namespace