Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I am having trouble using the IsNull() function in VB.net. Here the line of code:

 

If Not IsNull(TextBox1.Text) Then

End If

 

it tells me that IsNull is not declared, do I have to use an inherits system.??? to be able to use the IsNull() function?

  • Administrators
Posted

If you are checking if the textbox is empty you can check for an empty string

if TextBox1.Text <> String.Empty Then

End IF

 

If you are checking if a variable is null the nunder vb check for nothing

dim o as object
if o is nothing then

end if

Posting Guidelines FAQ Post Formatting

 

Intellectuals solve problems; geniuses prevent them.

-- Albert Einstein

Posted
If you are checking if the textbox is empty you can check for an empty string

if TextBox1.Text <> String.Empty Then

End IF

 

If you are checking if a variable is null the nunder vb check for nothing

dim o as object
if o is nothing then

end if

yes, but what about the IsNull function. I'd like to use that, i've used it before, but it's been a while and I'd like to know how to use it.

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