title: Interface from string to use as generic type
body: <p>I'm using Service Fabric in Azure and set up a proxy to an actor like this:</p>
  
  <pre><code>var proxy = ActorProxy.Create&lt;T&gt;(actorId);
  </code></pre>
  
  <p>Where T must be specified as the interface of the actor I'm calling. </p>
  
  <p>Let's say I have the name of the interface as a string:</p>
  
  <pre><code>var interfaceName = "IUserActor";
  </code></pre>
  
  <p>Is there a way to instatiate a generic type by this string name? And if there is, how do I call a method specified in given interface by it's string name? </p>
  
  <p>All actor interfaces inherits from IActor which is a part of Service Fabric. </p>
  
  <p>Now I understand that this is not recommended, the point is to be able to access the actor state for a given actor, from tests and administrative purposes. Speed is insignificant in this case, so any reflection approach will do. </p>
  
  <p>So, a basic usage example, not using the dynamic interface name:</p>
  
  <pre><code>public async Task&lt;string&gt; AdminGetState(ActorId actorId, string interfaceName){
     var proxy = ActorProxy.Create&lt;IUserActor&gt;(actorId);
     var state = await proxy.AdminGetStateJson();
     return JsonConvert.SerializeObject(state);
  }
  </code></pre>