C# Double PositiveInfinity
Description
Double PositiveInfinity
represents positive infinity.
This field is constant.
Syntax
Double.PositiveInfinity
has the following syntax.
public const double PositiveInfinity
Example
The following code example illustrates the use of PositiveInfinity:
/*from w ww. j a v a 2 s . c o m*/
using System;
public class MainClass{
public static void Main(String[] argv){
// This will equal Infinity.
Console.WriteLine("PositiveInfinity plus 10.0 equals {0}.",
(Double.PositiveInfinity + 10.0).ToString());
}
}
The code above generates the following result.