我从这里来
链接:https://docs.microsoft.com/en-us/dotnet/framework/reflection-and-codedom/how-to-examine-and-instantiate-generic-types-with-reflection
这是我的代码:
Type d1 = typeof(Dictionary<,>);
Type[] typeArgs = { typeof(string), typeof(string) };
Type constructed = d1.MakeGenericType(typeArgs);
object o = Activator.CreateInstance(constructed);
我的问题是:如何从对象“ o”访问方法和属性?