Quote Originally Posted by Flavor Flav View Post
Btw, why do people tell me never to use "Nothing" because something can never be "Nothing"??
I'm not sure who told you never to use Nothing but it was bad advice. Nothing should be used in VB when it's appropriate to use Nothing.

If you think about memory usage in its simplest form then a .NET variable is a binary number stored on the stack. Assigning Nothing to a variable will set that memory location to zero. Exactly what that means depends on the type of the variable. If it's a numeric type, e.g. Integer or Double, then it is the number zero. If it's a DateTime then it's 1/01/0001. If it's a Boolean then it's False. For other value types, i.e. structures, it is their default value, whatever that may be. For reference types, i.e. all classes and delegates, it is a null reference, i.e. no object. Reference types provide the most literal interpretation of Nothing. Consider yourself to be a Person object, i.e. an instance of the Person class. If that class has a Dog property and you have no dog then your Dog property is equal to Nothing. So, you should use Nothing with reference types when a variable or property refers to no object. It's less justified with value types but there are still instances where it's appropriate.