C# Double IsPositiveInfinity
Description
Double IsPositiveInfinity
returns a value indicating
whether the specified number evaluates to positive infinity.
Syntax
Double.IsPositiveInfinity
has the following syntax.
public static bool IsPositiveInfinity(
double d
)
Parameters
Double.IsPositiveInfinity
has the following parameters.
d
- A double-precision floating-point number.
Returns
Double.IsPositiveInfinity
method returns true if d evaluates to PositiveInfinity; otherwise, false.
Example
The following code example illustrates the use of IsPositiveInfinity:
using System;// w w w .j a v a 2s .c o m
public class MainClass{
public static void Main(String[] argv){
// This will return "true".
Console.WriteLine(Double.IsPositiveInfinity(4.0 / 0));
}
}
The code above generates the following result.