Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
您是否知道任何会在溢出或下溢时引发异常的语言?谢谢
.Net 框架有一个专门的溢出异常
溢出异常类
checked在 C# 中,您可以使用关键字让下溢和上溢引发异常:
checked
int a = checked(Integer.MIN_VALUE - 1);