title: Why "long value" equals to null is allowed?
body: <p>When I was debugging a few lines of code and asking me why on earth it wasn't working I have stumbled on this situation ...</p>
  
  <pre><code>if(answer.AnswerID == null) 
  {
      // do something
  }
  </code></pre>
  
  <p>When in fact it should be this way:</p>
  
  <pre><code>if(answer == null)
  {
      // do something
  }
  </code></pre>
  
  <ul>
  <li><code>answer</code> is an object of the type <code>Answer - a class</code>.</li>
  <li><code>AnswerID</code> is a property of type <code>long</code>.</li>
  </ul>
  
  <p>The weird thing is that if you try something like this:</p>
  
  <pre><code>long myLongValue = null;
  </code></pre>
  
  <p>The compiler will show you an error: </p>
  
  <pre><code>Connot convert null to long ...
  </code></pre>
  
  <p>So my question is: Why did I not get a <b>compile error</b> when I was trying to compare a <code>long type</code> with <code>null</code>?</p>
  
  <p><b>EDITED</b></p>
  
  <p>This question <b>IS NOT</b> about <code>nullable</code> types.</p>
  
  <p>I'm asking WHY .NET allows me to compare a long variable with null. I'm talking about <code>long type</code> and not about <code>long<b>?</b> type</code>.</p>