IsPositiveInfinity Method

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)

public static bool IsPositiveInfinity(
	double d
)

Parameters

d
Type: System.Double
A double-precision floating-point number.

Return Value

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

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

The following example illustrates the use of IsPositiveInfinity:


// This will return "true".
outputBlock.Text += String.Format("IsPositiveInfinity(4.0 / 0) == {0}.", Double.IsPositiveInfinity(4.0 / 0) ? "true" : "false") + "\n";


Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2016 Microsoft