Is there any other way to get List<foo>
directly from ValueCollection.
Current I am using below code
Dictionary<string,List<foo>> dic;
List<foo> list= new List<foo>();
foreach (List<foo> var in dic.Values)
{
list.AddRange(var);
}
OR
List<List<foo>> list= new List<List<foo>>(dic.Values);
Above conversion gives me List<List<foo>
but I want List<foo>
from dic.values without using for each loop if possible using .NET 2.0.