title: Passing a Class as Variable C#
body: <p>I need some help, hope it is doable.</p>
  
  <p>I would like to pass a Class as a variable in C#.</p>
  
  <p>This is my code so you can see what I am trying to do:</p>
  
  <pre><code>object shClass;
  switch ((cbxType.SelectedItem as ComboBoxItem).Value)
  {
      case "articles":
              shClass = ArticlesClass;
              break;
      case "topics":
              shClass = TopicsClass;
              break;
  }
  serializer.Deserialize&lt;shClass&gt;(response);
  </code></pre>
  
  <p>This code does not work, and this just to give you an idea what I need. Is this possible?</p>
  
  <p>I hope you can help me out. Thank you.</p>