Double.PositiveInfinity Field

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

Represents positive infinity. This field is constant.

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

Syntax

Public Const PositiveInfinity As Double
public const double PositiveInfinity

Remarks

The value of this constant is the result of dividing a positive number by zero.

This constant is returned when the result of an operation is greater than MaxValue.

Use IsPositiveInfinity to determine whether a value evaluates to positive infinity. It is not possible to determine whether a value evaluates to positive infinity by comparing it to another value equal to PositiveInfinity.

Examples

The following example illustrates the use of PositiveInfinity:

' This will equal Infinity.
outputBlock.Text &= "PositiveInfinity plus 10.0 equals " + (Double.PositiveInfinity + 10).ToString() + "." & vbCrLf
// This will equal Infinity.
outputBlock.Text += String.Format("PositiveInfinity plus 10.0 equals {0}.", (Double.PositiveInfinity + 10.0).ToString()) + "\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

IsPositiveInfinity

IsInfinity

NegativeInfinity