Using a list inside the Dictionary type
I am trying to further a specific question t开发者_JS百科hat was asked and answered here. Method chaining generic list extensions
My question now is, how would I access the lists INSIDE that dictionary data type so that it would display both bits of text?
Dictionary<string,List<string>> dict; // given
foreach(var kvp in dict)
{
Console.WriteLine(string.Format("{0}: {1}",
kvp.Key, kvp.Value.Aggregate((c,n)=>c+=','+n)));
}
精彩评论