Double.IsPositiveInfinity(Double) Methode

Definitie

Retourneert een waarde die aangeeft of het opgegeven getal positief oneindig is.

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

Parameters

d
Double

Een drijvendekommagetal met dubbele precisie.

Retouren

true als d dit wordt geƫvalueerd PositiveInfinity; anders , false.

Implementeringen

Voorbeelden

Het volgende codevoorbeeld illustreert het gebruik van 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

Opmerkingen

Drijvendekommabewerkingen worden geretourneerd PositiveInfinity om een overloopvoorwaarde aan te geven.

Van toepassing op

Zie ook