Double.IsPositiveInfinity(Double) Methode

Definition

Gibt einen Wert zurück, der angibt, ob die angegebene Zahl als positive Unendlichkeit ausgewertet wird.

public:
 static bool IsPositiveInfinity(double d);
public:
 static bool IsPositiveInfinity(double d) = System::Numerics::INumberBase<double>::IsPositiveInfinity;
public static bool IsPositiveInfinity(double d);
static member IsPositiveInfinity : double -> bool
Public Shared Function IsPositiveInfinity (d As Double) As Boolean

Parameter

d
Double

Eine Gleitkommazahl mit doppelter Genauigkeit.

Gibt zurück

truewenn d ausgewertet wird; PositiveInfinityandernfalls . false

Implementiert

Beispiele

Das folgende Codebeispiel veranschaulicht die Verwendung von IsPositiveInfinity:

// This will return "true".
Console.WriteLine("IsPositiveInfinity(4.0 / 0) == {0}.", Double.IsPositiveInfinity(4.0 / 0) ? "true" : "false");
// This will return "true".
printfn $"IsPositiveInfinity(4.0 / 0) = %b{Double.IsPositiveInfinity(4. / 0.)}."
' This will return "True".
Console.Write("IsPositiveInfinity(4.0 / 0) = ")
If Double.IsPositiveInfinity(4 / 0) Then
    Console.WriteLine("True.")
Else
    Console.WriteLine("False.")
End If

Hinweise

Gleitkommavorgänge werden zurückgegeben PositiveInfinity , um eine Überlaufbedingung zu signalisieren.

Gilt für:

Weitere Informationen