Follow @RoyOsherove on Twitter

Catch ex As Exception (sometimes)

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 :)

.Net Rocks with Brent Rector

Catch ex As Exception When...