In .Net 4, Double.PositiveInfinity returns ∞
Is there a method to display "Infinity"
using System; public class Program { public static void Main() { Console.WriteLine("PositiveInfinity {0}.", (Double.PositiveInfinity)); } } expected is PositiveInfinity Infinity., but the actual output is PositiveInfinity ∞.
double x = double.PositiveInfinity; Console.WriteLine("PositiveInfinity {0}.", Double.PositiveInfinity == x ? "Infinity": x.ToString());...double.IsPositiveInfinity(x) ? ...