【发布时间】:2014-04-22 00:08:09
【问题描述】:
当我试图获取值的类型时,为什么不能在集合属性中使用值字?
set
{
Type t = value.GetType();
if (dictionaries[int.Parse(value.GetType().ToString())] == null)
{
dictionaries[int.Parse(value.GetType().ToString())] = new Dictionary<string,t>();
}
}
它无法识别我的 Dictionary 构造函数中的单词 t。 我究竟做错了什么?我该如何解决?
【问题讨论】:
-
您能提供完整的属性定义吗?
标签: c# reflection types properties set