I got a question from “Russ” who asks whether there’s something that can be done to avoid the annoyance of having to remember to start with Not when you are testing if something is not Nothing:
If Not x Is Nothing Then Console.WriteLine(”Has a value.”)
This is something I forget to do all the time, breaking the flow of my thinking. We’ve had requests for this in the past, so for Whidbey we added an inverse operator to Is called (can you guess?) IsNot. So you can write:
If x IsNot Nothing Then Console.WriteLine(”Has a value.”)
Just one of those little things.