« Empty array in Oracle and .NET | Main | Very simple comment spam protection »

October 17, 2005

Overflow checking in .NET

An interesting information that took me a while to find out. I had some overflow problem earlier today and I expected that .NET will throw an overflow exception (of some sort) whe this happen, but by default .NET does not turn on overflow checking for performance reasons. It will only throw an exception if it happen on constants expressions. So how do I turn on overflow checking? You can turn this on from Visual Studio.NET option or you can use the checked/unchecked keywords.

Posted by vhadiant at October 17, 2005 10:29 PM





Trackback Pings

TrackBack URL for this entry:
http://www.hadianto.net/mov32/mt-tb.cgi/124

Comments

Post a comment





Remember Me?

(you may use HTML tags for style)