本范例介绍了C#中const的用法和一些常量声明
class ConstantDeclarations { public static void Main() { // Type Identifier Initializer const bool aBool = true; const byte aByte = 255; const decimal aDecimal = 0.99m; const double aDouble = 1.7 * 10308; const char aChar = '\uFFFF'; const float aFloat = 3.4f * 1038f; const int aInt = 2147483647; const long aLong = 9223372036854775807; const object aObject = null; const sbyte aSbyte = 127; const uint aUint = 4294967295; const short aShort = 32767; const string aString = "Sample"; const ushort aUshort = 65535; const ulong aUlong = 18446744073709551615; } }