Decimal.Max(Decimal, Decimal) Metod

Definition

Jämför två värden med beräkning som är större.

public:
 static System::Decimal Max(System::Decimal x, System::Decimal y) = System::Numerics::INumber<System::Decimal>::Max;
public static decimal Max(decimal x, decimal y);
static member Max : decimal * decimal -> decimal
Public Shared Function Max (x As Decimal, y As Decimal) As Decimal

Parametrar

x
Decimal

Värdet som ska jämföras med y.

y
Decimal

Värdet som ska jämföras med x.

Returer

xom den är större än y; annars . y

Implementeringar

Kommentarer

För IFloatingPoint<TSelf>matchar den här metoden funktionen IEEE 754:2019 maximum . Detta kräver att NaN-indata sprids tillbaka till anroparen och -0.0 att de behandlas som mindre än +0.0.

Gäller för