It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming Visual Basic Forum

OR works differently in VB....

Moderator: dafunkymunky

OR works differently in VB....

Postby EGD Eric on Thu Mar 13, 2008 5:14 pm

How do I get or to work properly, like in other languages? For example: the following code crashes in VB. In any other language, it would work:

Code: Select all
        If frmAbout Is Nothing Or frmAbout.IsDisposed = True Then
            frmAbout = New AboutBox
            frmAbout.Show()
        End If


it crashes because it checks both the left side and the right side. In C, or C#, or Java, it would check the left side, go: Ah! one condition has been satisfied, I do not need to check the right one. Not VB, nu-uh, it checks both like a bonehead. Is there anyway to get it to just check one?[/code][/b]
EGD Eric
 
Posts: 0
Joined: Thu Mar 13, 2008 5:10 pm

Who is online

Users browsing this forum: No registered users and 4 guests