C# 中声明常量的方法的代码

把内容过程经常用的内容珍藏起来,下面的资料是关于C# 中声明常量的方法的内容。
class ConstantDeclarations
{
public static void Main()
{
const bool aBool = true;
const byte aByte = 255;
const decimal aDecimal = 0.99m;
const char aChar = 'uFFFF';
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;
}
}




猜你喜欢

转载自www.cnblogs.com/s-squirrel/p/10842870.html