Megosztás a következőn keresztül:


Rational Struct

Definition

Describes a number that can be created by the division of 2 integers.

public value class Rational
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 393216)]
struct Rational
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 393216)]
public struct Rational
var rational = {
numerator : /* Your value */,
denominator : /* Your value */
}
Public Structure Rational
Inheritance
Rational
Attributes

Windows requirements

Device family
Windows 10, version 1803 (introduced in 10.0.17134.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v6.0)

Remarks

If you are representing a whole number, the denominator should be 1.

Fields

Denominator

The number below the line in a fraction.

Numerator

The number above the line in a fraction.

Applies to

See also