What do nested generics in C# mean?
问题 A bit of a basic question, but one that seems to stump me, nonetheless. Given a "nested generic": IEnumerable<KeyValuePair<TKey, TValue>> Is this stating that IEnumerable can have generic types that are themselves KeyValuePair 's ? Thanks, Scott 回答1: Yes. The KeyValuePair type expects two generic type parameters. We can either populate them by pointing to concrete types: IEnumerable<KeyValuePair<string, int>> Or we can populate them by using other generic parameters already specified by the