Rational.Rational

Rational constructor

Initializes a new instance of the Rational class.

public Rational(int numerator, int denominator)
ParameterTypeDescription
numeratorInt32The numerator.
denominatorInt32The denominator.

Exceptions

exceptioncondition
ArgumentOutOfRangeExceptionnumerator;Numberator should be grater zero. or denominator;Denominator should be grater zero.

See Also