c#: Method expects type
<pre><code>class Country
{
   //props
}
</code></pre>

<p>dataContext is a variable with a method Set(), which works fine like as below</p>

<pre><code>dataContext.Set&lt;Country&gt;().SomeThing(); 
</code></pre>

<p>but  i dont want to hard code the <strong>type=Country</strong>, rather i want to extract type out from a variable eg</p>

<pre><code>function MyFunction(object o)
{
   dataContext.Set&lt;/*something_here*/&gt;().SomeThing();
   //some how extract type from variable o
}
</code></pre>
