Click here to Skip to main content
15,904,823 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Windows SDK error message Pin
progload22-Aug-05 10:14
progload22-Aug-05 10:14 
GeneralRe: Windows SDK error message Pin
DaveC42691322-Aug-05 10:56
DaveC42691322-Aug-05 10:56 
GeneralRe: Windows SDK error message Pin
DaveC42691325-Aug-05 7:01
DaveC42691325-Aug-05 7:01 
GeneralRe: Windows SDK error message Pin
DaveC4269139-Sep-05 8:43
DaveC4269139-Sep-05 8:43 
QuestionVBer new to VB.net - handles divide by zero? Pin
DaveC42691318-Aug-05 10:35
DaveC42691318-Aug-05 10:35 
AnswerRe: VBer new to VB.net - handles divide by zero? Pin
Christian Graus18-Aug-05 15:09
protectorChristian Graus18-Aug-05 15:09 
GeneralRe: VBer new to VB.net - handles divide by zero? Pin
Dave Kreskowiak19-Aug-05 6:48
mveDave Kreskowiak19-Aug-05 6:48 
GeneralRe: VBer new to VB.net - handles divide by zero? Pin
Christian Graus21-Aug-05 13:31
protectorChristian Graus21-Aug-05 13:31 
Isn't CInt one of the legacy methods that was going to be removed ? I wasn't sure on this.

Dave Kreskowiak wrote:
His code is converting the DivideByZero exception to a string before it blows up. This results in the string "Infinity" being returned.

Wrong. I converted into code which didn't use strings at all, and the Single variable gets the VALUE of positive Infinity. That's where the string value comes from, the Single, which does not blow up. Then I changed the code to set to an int, and it DOES blow up then, but it doesn't throw a DivideByZero exception, it throws an OverflowException. C# will blow up on a divide by zero, no matter what type it's being set to, and it throws the right exception.

Do you have an explanation for this that doesn't involve the VB.NET design team spending most of their time drunk ? Because we spent a Friday laughing about it here ( where we never use VB.NET ).


Christian Graus - Microsoft MVP - C++
GeneralRe: VBer new to VB.net - handles divide by zero? Pin
Dave Kreskowiak21-Aug-05 18:13
mveDave Kreskowiak21-Aug-05 18:13 
GeneralRe: VBer new to VB.net - handles divide by zero? Pin
Christian Graus21-Aug-05 18:15
protectorChristian Graus21-Aug-05 18:15 
GeneralRe: VBer new to VB.net - handles divide by zero? Pin
Dave Kreskowiak22-Aug-05 6:49
mveDave Kreskowiak22-Aug-05 6:49 
GeneralRe: VBer new to VB.net - handles divide by zero? Pin
Christian Graus22-Aug-05 11:47
protectorChristian Graus22-Aug-05 11:47 
GeneralRe: VBer new to VB.net - handles divide by zero? Pin
Dave Kreskowiak23-Aug-05 2:13
mveDave Kreskowiak23-Aug-05 2:13 
GeneralRe: VBer new to VB.net - handles divide by zero? Pin
Christian Graus23-Aug-05 13:23
protectorChristian Graus23-Aug-05 13:23 
GeneralRe: VBer new to VB.net - handles divide by zero? Pin
progload21-Aug-05 19:03
progload21-Aug-05 19:03 
GeneralRe: VBer new to VB.net - handles divide by zero? Pin
Christian Graus21-Aug-05 19:16
protectorChristian Graus21-Aug-05 19:16 
GeneralRe: VBer new to VB.net - handles divide by zero? Pin
progload21-Aug-05 21:06
progload21-Aug-05 21:06 
GeneralRe: VBer new to VB.net - handles divide by zero? Pin
Christian Graus22-Aug-05 11:43
protectorChristian Graus22-Aug-05 11:43 
AnswerRe: VBer new to VB.net - handles divide by zero? Pin
Daniel132418-Aug-05 16:15
Daniel132418-Aug-05 16:15 
GeneralRe: VBer new to VB.net - handles divide by zero? Pin
Christian Graus18-Aug-05 17:09
protectorChristian Graus18-Aug-05 17:09 
GeneralRe: VBer new to VB.net - handles divide by zero? Pin
Daniel132418-Aug-05 17:25
Daniel132418-Aug-05 17:25 
GeneralRe: VBer new to VB.net - handles divide by zero? Pin
Christian Graus18-Aug-05 17:32
protectorChristian Graus18-Aug-05 17:32 
AnswerRe: VBer new to VB.net - handles divide by zero? Pin
progload18-Aug-05 19:38
progload18-Aug-05 19:38 
GeneralRe: VBer new to VB.net - handles divide by zero? Pin
DaveC42691319-Aug-05 3:27
DaveC42691319-Aug-05 3:27 
GeneralRe: VBer new to VB.net - handles divide by zero? Pin
progload19-Aug-05 3:50
progload19-Aug-05 3:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.