After two years of C#, I\'m now back to VB.net because of my current job. In C#, I can do a short hand testing for null or false value on a string variable like this:
<
Not is exactly like ! (in the context of Boolean. See RoadWarrior's remark for its semantics as one's complement in bit arithmetic). There's a special case in combination with the Is operator to test for reference equality:
If Not x Is Nothing Then ' … '
' is the same as '
If x IsNot Nothing Then ' … '
is equivalent to C#'s
if (x != null) // or, rather, to be precise:
if (object.ReferenceEquals(x, null))
Here, usage of IsNot is preferred. Unfortunately, it doesn't work for TypeOf tests.