Is Nothing? I wish...

I need to do a comparison to see if an object is nothing (I'm parsing through a tree and I want to see if the next sibling is nothing).  Is there anything like an IsNothing() compare? How can I check to see if an object=nothing.

jmalcolmAsked:
Who is Participating?
 
jeffcameronConnect With a Mentor Commented:
if object is nothing then
0
 
mark2150Commented:
isnull()
0
 
jeffcameronCommented:
i dont beleive isnull will work
0
 
jmalcolmAuthor Commented:
Jeff, very good.  I don't understand why the designers of VB chose to go with such different method of dealing with invalid types.  There's "ISNULL" "ISEMPTY" and then simply IS for the Nothing object.  That's not very intuative.  Thanks.

P.S. You are right, ISNULL won't work for nothing objects.  I've tried.


0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.