Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi all,

 

Quick question...

 

from a syntax and a programaticly correct point of view, is it better to form a construct like this...

 

If oDB.GetObject Is Nothing Then
    Exit Sub
End If

Continue...

 

or this...

 

If Not oDB.GetObject Is Nothing Then
    Continue...
End If

 

Cheers,

 

Lee.

  • Moderators
Posted

It depends on which condition you need to handle... if you will have code in both then either one is fine, but NOT if you're going to use Exit Sub. (Don't use it)

 

Also, drop the o that prefixes oDB since everything in .NET is an Object.

Visit...Bassic Software

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...