标签: asp.net
IDictionary<string, IDictionary<string, string>> test = new Dictionary<string, Dictionary<string, string>>();
此转换是错误的,为什么不能隐式Dictionary<string,Dictionary<string,string>> to IDictionary<string,IDictionary<string,string>>?
Dictionary<string,Dictionary<string,string>> to IDictionary<string,IDictionary<string,string>>?
答案 0 :(得分:1)
查看此博客"Generic type parameter variance in the CLR",其中解释了为何不允许转化。