【发布时间】:2019-03-07 19:17:46
【问题描述】:
假设我有以下类结构:
public class Outer<T>
{
public class Inner<U>
{
}
}
还有一些代码:
var testType = typeof(Outer<string>.Inner<int>);
如何从testType 变量中获取构造的泛型类型typeof(Outer<string>) 或泛型typeof(string) 的值?
【问题讨论】:
标签: c# .net reflection