To do in "regular" C #, you must use reflection to get MethodInfo, then use MakeGenericMethod () and Invoke (). However, this is simpler:
Foo((dynamic)testObj);
Thinking Approach Here:
var method = typeof(Class1).GetMethod("Foo").MakeGenericMethod(argType); method.Invoke(this, new object[] { testObj });
source share