static unsafe void Main(string[] args) { unchecked //checked 运行时候引发异常 { int n = int.MaxValue; n++; Console.WriteLine(n); } Console.ReadKey(); }
checked和unchecked转换
原文:https://www.cnblogs.com/bhfdz/p/8794746.html