Double.IsPositiveInfinity Method

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Returns a value indicating whether the specified number evaluates to positive infinity.

Namespace: System
Assembly: mscorlib (in mscorlib.dll)

Syntax

Public Shared Function IsPositiveInfinity ( _
    d As Double _
) As Boolean
public static bool IsPositiveInfinity(
    double d
)

Parameters

Return Value

Type: System..::.Boolean
true if d evaluates to PositiveInfinity; otherwise, false.

Remarks

Floating-point operations return PositiveInfinity to signal an overflow condition.

Examples

The following example illustrates the use of IsPositiveInfinity:

' This will return "True".
outputBlock.Text &= "IsPositiveInfinity(4.0 / 0) = "
If Double.IsPositiveInfinity(4 / 0) Then
   outputBlock.Text &= "True." & vbCrLf
Else
   outputBlock.Text &= "False." & vbCrLf
End If
// This will return "true".
outputBlock.Text += String.Format("IsPositiveInfinity(4.0 / 0) == {0}.", Double.IsPositiveInfinity(4.0 / 0) ? "true" : "false") + "\n";

Version Information

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Platforms

Windows Phone

See Also

Reference

Double Structure

System Namespace

IsInfinity

IsNegativeInfinity

PositiveInfinity

NegativeInfinity