Hi All,
I have a generic dictonary which is templated in the following manner:
Dictionary<object, IList<ISomeInterface>> dictionary1 = new Dictionary<object, IList<ISomeInterface>>();
If I wanted to omit certain list items against arbitrary keys (that is the items that are in the list contained within the value part of each of the key value pairs making up the dictionary) given some arbitrary condition (lets say omitting list items where a list item contained the string "abc")
I would expect to able to create/project into a new dictionary which would contain entries which contained lists WITHOUT those items whose name contained "abc"
How do I achieve this using a Lambda expression?
I was trying something like this:
var result1 = dictionary1.Where(x => x.Value == x.Value.Select(y => !y.contains("abc"));