I have a Dictionary
Dictionary<string, List<MyClass>> MyDictionary = new Dictionary<string,List<MyClass>>(); I am using Linq to obtain a List (from value) via the key
List<MyClass> CurrentList = null; CurrentList = MyDictionary.Where(d => d.Key.Contains(strKey)).Select(x => x.Value).Cast<Dictionary<string, List<MyClass>>>(); The error I am getting is I can not convert the dictionary to my list.
Have I missed anything?
Thanks.
Dictionaryif your result must be aList?