Android Guides | Samples

Android.Util.Rational Class

See Also: Rational

Syntax

[Android.Runtime.Register("android/util/Rational", DoNotGenerateAcw=true)]
public sealed class Rational : Number, IComparable, IDisposable

Remarks

An immutable data type representation a rational number.

Contains a pair of ints representing the numerator and denominator of a Rational number.

[Android Documentation]

Requirements

Namespace: Android.Util
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0

The members of Android.Util.Rational are listed below.

See Also: Number

Public Constructors

Public Properties

[read-only]
DenominatorInt32. Gets the denominator of the rational
[read-only]
IsFiniteBoolean. Indicates whether this rational represents a finite value.
[read-only]
IsInfiniteBoolean. Indicates whether this rational represents an infinite value.
[read-only]
IsNaNBoolean. Indicates whether this rational is a Not-a-Number (NaN) value.
[read-only]
IsZeroBoolean. Indicates whether this rational represents a zero value.
[read-only]
static
NaNRational. Constant for the Not-a-Number (NaN) value of the Rational type.
[read-only]
static
NegativeInfinityRational. Constant for the negative infinity value of the Rational type.
[read-only]
NumeratorInt32. Gets the numerator of the rational.
[read-only]
static
PositiveInfinityRational. Constant for the positive infinity value of the Rational type.
[read-only]
static
ZeroRational. Constant for the zero value of the Rational type.

Protected Properties

[read-only]
override
ThresholdClassIntPtr. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.
[read-only]
override
ThresholdTypeType. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Public Methods

CompareTo(Rational) : Int32
Compare this rational to the specified rational to determine their natural order.
override
DoubleValue() : Double
Returns the value of the specified number as a double.
override
FloatValue() : Single
Returns the value of the specified number as a float.
override
IntValue() : Int32
Returns the value of the specified number as a int.
override
LongValue() : Int64
Returns the value of the specified number as a long.
static
ParseRational(String) : Rational
Parses the specified string as a rational value.

Explicitly Implemented Interface Members