How to use a variable as a Type?
<p>I have an object that is passed to me as ISomething.
I need to serialize the object however my serilizer expects a type parameter of a concrete type i.e:</p>

<pre><code>string xml = Utilities.Serialize&lt;ConcreteType&gt;(myObject);
</code></pre>

<p>Basically I want to to the same thing as this guy: <a href="http://stackoverflow.com/questions/955331/creating-a-generic-object-based-on-a-type-variable">Creating a generic object based on a Type variable</a></p>

<p>however I dont want to create a new instance of an object I want to use the resulting type as a parameter to my generic class.</p>

<p>So my question in a nutshell is how do I create some variable that represents the concrete type of some object that I can use with a generic class like this: </p>

<pre><code>string xml = Utilities.Serialize&lt;ConcreteType&gt;(myObject);
</code></pre>

<p>where ConcreteType is what I need to create.</p>
