title: Why is GetType() returning DateTime type for Nullable<DateTime>
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/785358/nullable-type-is-not-a-nullable-type">Nullable type is not a nullable type?</a>  </p>
  </blockquote>
  
  
  
  <p>In the following code:</p>
  
  <pre><code>DateTime? dt = DateTime.Now;
  MessageBox.Show(dt.GetType().ToString());
  </code></pre>
  
  <p>the message box shows "System.DateTime", instead of <code>Nullable&lt;DateTime&gt;</code>. The following also returns false (because the GetType is wrong):</p>
  
  <pre><code>if (dt.GetType().IsAssignableFrom(typeof(DateTime?))) 
   ...
  </code></pre>
  
  <p>(btw, using <code>DateTime?</code> or <code>Nullable&lt;DateTime&gt;</code> doesn't make a difference)
  In the watch window, you have the "Type" column that's displaying the correct type (System.DateTime?).</p>
  
  <p>In my code I have reference to dt as an <code>object</code>, so I need to get to the underlying type correctly. How can I do this?</p>