Catch ex As Exception (sometimes)

By Roy Osherove In .Net Quotations

Markdown version

Historical article · Originally published August 13, 2003; technical details may be outdated.

Mattias Sjögren quickly replied to my last post about the exceptions not being caught in VB.NET :

“You don't get a DivideByZeroException because you're using the floating point division operator (/) and not the integer division one (\). Only integer division by zero throws, floating point generates NAN or infinity or something like that. “

And Paul Vick promised to blog about this behaviour some day. Boy, I really like this community :)

More in .Net Quotations

All posts in .Net Quotations