What is the difference between
checked(a + b)
and
unchecked(a + b)
?
The other answers cover the difference between the two. One thing worth noting is that if a and b are floats there will be no difference. It only works for integer operations.
There is also a build option you can set so everything is checked. This will mean your app runs slightly slower but you won't need to put checked around your arithmetic operations.
Here is a nice writeup that describes some pitfalls: http://www.codeproject.com/KB/cs/overflow_checking.aspx