double const : Double : Data Type C# Examples


C# Examples » Data Type » Double »

 

double const





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);
      }
}
    
   
  
   



Output

pi = 3.1416


HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo Data Type
» Double