Reputation: 1167
IDictionary<string, IDictionary<string, string>> test = new Dictionary<string, Dictionary<string, string>>();
This conversion is error, why cannot implicitly Dictionary<string,Dictionary<string,string>> to IDictionary<string,IDictionary<string,string>>?
Upvotes: 1
Views: 728
Reputation: 306
Check out this blog "Generic type parameter variance in the CLR" which explains why conversion is not allowed.
Upvotes: 1