title: Call Generic method using runtime type and cast return object
body: <p>I'm using reflection to call a generic method with a type determined at runtime.  My code is as follows:</p>
  
  <pre><code>Type tType = Type.GetType(pLoadOut.Type);
  MethodInfo method = typeof(ApiSerialiseHelper).GetMethod("Deserialise", new Type[] { typeof(string) });
  MethodInfo generic = method.MakeGenericMethod(tType);
  generic.Invoke(obj, new object[] { pLoadOut.Data });
  </code></pre>
  
  <p>This works ok.  However the generic.Invoke method returns an object, but what I would like is the type determined at runtime.  Is this possible with this approach, or is there a better option?</p>
  
  <p>Mark</p>