title: Why can't you use null as a key for a Dictionary<bool?, string>?
body: <p>Apparently, you cannot use a <code>null</code> for a key, even if your key is a nullable type.</p>
  
  <p>This code:</p>
  
  <pre><code>var nullableBoolLabels = new System.Collections.Generic.Dictionary&lt;bool?, string&gt;
  {
      { true, "Yes" },
      { false, "No" },
      { null, "(n/a)" }
  };
  </code></pre>
  
  <p>...results in this exception:</p>
  
  <blockquote>
    <p>Value cannot be null.
    Parameter name: key</p>
    
    <p>Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.</p>
    
    <p><code>[ArgumentNullException: Value cannot be null. Parameter name: key]</code>
       <code>System.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument) +44</code>
       <code>System.Collections.Generic.Dictionary'2.Insert(TKey key, TValue value, Boolean add) +40</code><br>
       <code>System.Collections.Generic.Dictionary'2.Add(TKey key, TValue value) +13</code></p>
  </blockquote>
  
  <p><strong>Why would the .NET framework allow a nullable type for a key, but not allow a null value?</strong></p>