Integer, Double, and Decimal Enumerations

 

Declaring a Number as a Constant

If a number is declared as a constant in a Visual Studio C# project, then the declaration must appear in the class declaration and the constant must be assigned a value in that declaration. Once a number is declared a constant, the number cannot be changed in the code.

 public const double dblFearFactor = 7.22; 
 


Unlocking Microsoft C# V 2.0 Programming Secrets
Unlocking Microsoft C# V 2.0 Programming Secrets (Wordware Applications Library)
ISBN: 1556220979
EAN: 2147483647
Year: 2005
Pages: 129

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net