double const : double « Data Type « C# / CSharp Tutorial






To declare a variable of type double, use a statement similar to that shown here:

double result;
using System;


class MyConsts
{
   public const double PI = 3.1416;
}

class MainClass
{
   static void Main()
   {
      Console.WriteLine ("pi = {0}", MyConsts.PI);
   }
}
pi = 3.1416








2.26.double
2.26.1.Double: Epsilon, Positive/Negative Infinity and Max/Min Value
2.26.2.double const
2.26.3.comparison between double values
2.26.4.Specifying a Literal double
2.26.5.Exponential Notation