checked和unchecked转换

        static unsafe void Main(string[] args)
        {
            unchecked //checked 运行时候引发异常
            {
                int n = int.MaxValue;
                n++;
                Console.WriteLine(n);
            }


            Console.ReadKey();
        }

  

原文地址:https://www.cnblogs.com/bhfdz/p/8794746.html