Edit

Share via


Double.PositiveInfinity Field

Definition

Represents positive infinity. This field is constant.

public const double PositiveInfinity = Infinity;

Field Value

Value = Infinity

Examples

The following code example illustrates the use of PositiveInfinity:

// This will equal Infinity.
Console.WriteLine("PositiveInfinity plus 10.0 equals {0}.", (Double.PositiveInfinity + 10.0).ToString());

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 Double.MaxValue.

Use IsPositiveInfinity to determine whether a value evaluates to positive infinity.

Applies to

See also