C# 中声明常量的方法

From , 3 Years ago, written in C#, viewed 53 times.
URL https://pastebin.vip/view/25047349
  1. class ConstantDeclarations
  2. {
  3.    public static void Main()
  4.    {
  5.    // Type          Identifier Initializer
  6.       const bool    aBool      = true;
  7.       const byte    aByte      = 255;
  8.       const decimal aDecimal   = 0.99m;
  9.       const double  aDouble    = 1.7 * 10308;
  10.       const char    aChar      = '\uFFFF';
  11.       const float   aFloat     = 3.4f * 1038f;
  12.       const int     aInt       = 2147483647;
  13.       const long    aLong      = 9223372036854775807;
  14.       const object  aObject    = null;
  15.       const sbyte   aSbyte     = 127;
  16.       const uint    aUint      = 4294967295;
  17.       const short   aShort     = 32767;
  18.       const string  aString    = "Sample";
  19.       const ushort  aUshort    = 65535;
  20.       const ulong   aUlong     = 18446744073709551615;
  21.    }
  22. }
  23. //csharp/4154

Reply to "C# 中声明常量的方法"

Here you can reply to the paste above

captcha

https://burned.cc - Burn After Reading Website