title: <> And Not In VB.NET
body: <p>I'm having the exciting task of finding out about VB.NET's <code>&lt;&gt;</code> and <code>Not</code> operators.  <code>Not</code> - I'm assuming by my small use of it - is the functional equivalent of <code>!</code> in languages such as C# and <code>&lt;&gt;</code> being equivalent of <code>!=</code>.</p>
  
  <p>In VB.NET a common problem is doing Boolean expressions against objects that don't have a reference, it appears.  So if we do</p>
  
  <pre><code>If Request.QueryString("MyQueryString") &lt;&gt; Nothing Then
  </code></pre>
  
  <p>This will actually fail if the query string doesn't exist.  Why, I don't know.  The way that it's done by older coders is as follows:</p>
  
  <pre><code>If Not Request.QueryString("MyQueryString") Is Nothing Then
  </code></pre>
  
  <p>And this tends to work.  To me they're functionally equivalent though operators tend to do different comparisons dependent on certain factors such as operator precedence, why it doesn't work in this case however, I do not know, and neither have I found any relevant material.</p>
  
  <p>I ask this as I'm having to write standards documentation and we're determining the use of either the <code>Not</code> or <code>&lt;&gt;</code>.  Any ideas on which way around it should be, or you <em>should</em> do it?</p>