Is there a VB.net equivalent for C#'s ! operator?
vb.net
Solution
In the context you show, the VB `Not` keyword is indeed the equivalent of the C# `!` operator. But note that the VB `Not` keyword is actually overloaded to represent two C# equivalents:
- logical negation: `!`
- bitwise complement: `~`
For example, the following two lines are equivalent:
- C#: `useThis &= ~doNotUse;`
- VB: `useThis = useThis And (Not doNotUse)`
Problem
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: ``` if(!String.IsNullOrEmpty(blah)) { ...code goes here } ``` however I'm a little confused about how to do this in VB.net. ``` if Not String.IsNullOrEmpty(blah) then ...code goes here end if ``` Does the above statement mean if the string is not null or empty? Is the `Not` keyword operate like the C#'s `!` operator?