title: VB.NET language and Nothing : why is it the way it is?
body: <p>This is a question about the VB.NET language. Since I am using it every day, I just try to understand the motivations behind some of its constructs.</p>
  
  <p>I just find out that this line :</p>
  
  <pre><code>If myObject Is Nothing then
  </code></pre>
  
  <p>is as correct as this one is :</p>
  
  <pre><code>If Nothing Is myObject Then
  </code></pre>
  
  <p>Same results. Using ildasm, we can see that these lines are translated to :</p>
  
  <pre><code>if myObject = null then
  </code></pre>
  
  <p>and</p>
  
  <pre><code>if null = myObject then
  </code></pre>
  
  <p>Well, but, in VB.NET, you cannot write :</p>
  
  <pre><code>if myObject = Nothing Then
  </code></pre>
  
  <p>The compiler will not accept that.</p>
  
  <p>Mmm, to me, <strong><em>If Nothing Is myObject</em></strong> is much more less obvious than <strong><em>If myObject = Nothing</em></strong>.</p>
  
  <p>Why did VB.NET authors just think the opposite ? Any hint ?</p>