Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hello,

 

I have a code snippet where I perform "divide by zero" operation. But I am not getting an Exception thrown here, insteadI the operation results in value a which is either a positiveinfinity or negativeinfinity or NaN depending on the dividend. Why is the Exception not being thrown in this case? This is the first time I am trying to use exceptions in VB.I wish to use structured exception handling.

 

Shankar.

  • *Gurus*
Posted

You can read the help on the DivideByZeroException class to get more information about when and when it isn't thrown. In some arithmetic rules, a divide by zero doesn't result in an exception.

 

[mshelp=ms-help://MS.VSCC/MS.MSDNQTR.2002APR.1033/cpref/html/frlrfsystemdividebyzeroexceptionclasstopic.htm]MS Help[/mshelp]

MVP, Visual Developer - .NET

 

Now you see why evil will always triumph - because good is dumb.

 

My free .NET Windows Forms Controls and Articles

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...