title: Casting using System.Type - c#
body: <p>Is it possible to cast an object to a desired type using <code>System.Type?</code> as the reference?</p>
  
  <p>I had a search and the general consensus was no, although I was hoping there may be some aids introduced in C# 4.0 that could help me.</p>
  
  <p>I.e. the below will not work, but the pseudocode is what I would like.</p>
  
  <pre><code>object o = null;
  var t = typeof(string);
  ...
  string foo = (t)o;
  </code></pre>
  
  <p>Edit: I need use <code>XmlSerializer</code> to reconstruct / deserialize to the type stored in <code>t</code></p>