title: C#: Superclass still has subclass info after upcast
body: <p>I have 2 types: <code>BaseQuestion</code> and <code>Question</code>. <code>Question</code> inherits some properties from <code>BaseQuestion</code>. Now I have created a Web API to make a <code>BaseQuestion</code> available. The <code>Question</code> datatype has additional properties that I do not want to make available. I have a method that retrieves a <code>Question</code> and my initial plan was to just implicitly upcast it to <code>BaseQuestion</code>. I thought it would lose all extra properties that I do not want to make accessible and I could return it. 
  Well, it doesn't. This is what I do:</p>
  
  <pre><code>Question q = allQuestions[0];
  BaseQuestion bq = q;
  string type = bq.GetType().ToString();
  </code></pre>
  
  <p>The type of bq is still "Question". I cannot access the BaseQuestion properties, but I can still see them in the debugger and they are in the JSON output that I send to the client.</p>
  
  <p>Any ideas on how I can "force" bq to be of type <code>BaseQuestion</code> and not to have any properties that are defined in the subclass?</p>