There are 2 sorts of types if you program in an OO language : reference and
value types
Value types are most built in types like integer, string (I think), money,
etc and you can think of the variable as actualy holding the value.
A reference type is Nothing (null in c#) or contains a reference to the actual
value which is always a class.
If you use a reference type and you want to know whether it contains a value
you do this by asking " is nothing", ie you are asking if it contains a reference.
But VB.NEt isn't so strict and it allows things like
dim i as integer = 5
if i = nothing then ...
This is not stritly right as i is a value type. But VB.NET guessed what you
ment (but guessing is a bad idea for a compiler).
So to be short : if you are dealing with classes you have to use nothing.
To complicate things further structs are value types. I suggest you google
for "difference reference value type" to dig in deeper cause it's quit a
technical topic.
Let me know if you have any more questions..
Cheers,
Tom Pester
> I was looking at different ways of doing the same thing and at the
> moment was looking at the use of "is" and "=", as I have at times
[quoted text clipped - 40 lines]
>
> Tom
Tom.PesterDELETETHISSS@pandora.be - 16 Jul 2005 02:20 GMT
I found a good text about it :
http://www.awprofessional.com/content/images/0321245660/items/wagner_item6.pdf
Cheers,
Tom Pester