Passing a generic type to a method which takes a generic type
<p>I'm trying to write a method which takes a generic type T and passing it to a method (client.Execute) which takes a generic type</p>

<pre><code>private T GetResult&lt;T&gt;(IRestRequest request)
{
    var client = new RestClient(string.Format("{0}:{1}", ApiBase, ApiPort))
    var response = client.Execute&lt;T&gt;(request);
    // omitted for brevity 
}
</code></pre>

<p>How ever the following line dosnt compile </p>

<pre><code>var response = client.Execute&lt;T&gt;(request);
</code></pre>

<blockquote>
  <p>Error 1   'T' must be a non-abstract type with a public parameterless
  constructor in order to use it as parameter 'T' in the generic type or
  method</p>
</blockquote>

<p>The Execute method is defined as follows</p>

<pre><code>public virtual RestSharp.IRestResponse&lt;T&gt; Execute&lt;T&gt;(RestSharp.IRestRequest request) where T : new()
</code></pre>