• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 154
  • Last Modified:

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.

0
jmalcolm
Asked:
jmalcolm
  • 2
1 Solution
 
jeffcameronCommented:
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.

Join & Write a Comment

Featured Post

Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now