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

Visual Basic

 
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 
GeneralRe: VBer new to VB.net - handles divide by zero? Pin
DaveC42691319-Aug-05 4:24
DaveC42691319-Aug-05 4:24 
GeneralRe: VBer new to VB.net - handles divide by zero? Pin
progload19-Aug-05 4:53
progload19-Aug-05 4:53 
GeneralRe: VBer new to VB.net - handles divide by zero? Pin
DaveC42691319-Aug-05 5:20
DaveC42691319-Aug-05 5:20 
GeneralRe: VBer new to VB.net - handles divide by zero? Pin
Christian Graus21-Aug-05 19:19
protectorChristian Graus21-Aug-05 19:19 
AnswerRe: VBer new to VB.net - handles divide by zero? Pin
Thomas Stockwell19-Aug-05 8:32
professionalThomas Stockwell19-Aug-05 8:32 
1] The book says Catch e As Exception, but Visual Studio defaults to 'ex' instead of 'e'. If I deliberately put in 'e', I get a build error: "Variable 'e' hides a variable in an enclosing block." What is wrong here?

The book that you are using may have a different definition in its parameters for your code block.

For example:

public sub Test(byval sender as object, byval e as system.eventargs)<br />
 Dim n1, n2 As Integer<br />
Dim n3 As Single<br />
n1 = CInt(txtIn1.Text)<br />
n2 = CInt(txtIn2.Text)<br />
Try<br />
lblOut.Text = n1 / n2<br />
Catch e As Exception<br />
lblWarn.Text = "Warning!"<br />
End Try<br />
end sub<br />


If you tried to catch 'e as an exception' than the e would override the 'e as system.eventargs' which is in the sub parameter. So you can change either of the two variables but they cannot be the same. Look in your book and see if the parameters for the sub or function use an e variable.
GeneralRe: VBer new to VB.net - handles divide by zero? Pin
rwestgraham19-Aug-05 9:05
rwestgraham19-Aug-05 9:05 
Generalcombing a vb program with office command ! Pin
microuser_200018-Aug-05 9:08
microuser_200018-Aug-05 9:08 
GeneralRe: combing a vb program with office command ! Pin
microuser_200021-Aug-05 8:00
microuser_200021-Aug-05 8:00 
GeneralRe: combing a vb program with office command ! Pin
Steve Pullan21-Aug-05 14:20
Steve Pullan21-Aug-05 14:20 
Generalmulticolumn combobox Pin
sifferbo18-Aug-05 8:39
sifferbo18-Aug-05 8:39 
GeneralSoftwares sharing file Pin
loicmichel18-Aug-05 5:48
loicmichel18-Aug-05 5:48 
GeneralRe: Softwares sharing file Pin
Christian Graus18-Aug-05 15:11
protectorChristian Graus18-Aug-05 15:11 
General.aspx page in an email Pin
mcgann18-Aug-05 5:30
mcgann18-Aug-05 5:30 
GeneralRe: .aspx page in an email Pin
Dave Kreskowiak18-Aug-05 5:46
mveDave Kreskowiak18-Aug-05 5:46 
GeneralFiles in copied in clipboard Pin
MohammadAmiry18-Aug-05 1:49
MohammadAmiry18-Aug-05 1:49 
GeneralShutting the computer down Pin
MohammadAmiry17-Aug-05 23:52
MohammadAmiry17-Aug-05 23:52 
GeneralRe: Shutting the computer down Pin
Rizwan Bashir18-Aug-05 1:33
Rizwan Bashir18-Aug-05 1:33 
GeneralIt does not work! Pin
MohammadAmiry18-Aug-05 3:45
MohammadAmiry18-Aug-05 3:45 
GeneralRe: It does not work! Pin
Dave Kreskowiak18-Aug-05 4:30
mveDave Kreskowiak18-Aug-05 4:30 
GeneralRe: Shutting the computer down (Edited for additional info) Pin
progload18-Aug-05 6:34
progload18-Aug-05 6:34 
GeneralExecuting vbscript from ASP.NET page Pin
Anonymous17-Aug-05 23:29
Anonymous17-Aug-05 23:29 
GeneralRe: Executing vbscript from ASP.NET page Pin
Rizwan Bashir18-Aug-05 1:35
Rizwan Bashir18-Aug-05 1:35 

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.