I have an <int, string> dictionary and I am trying to check an IEnumerable of objects to see, whether a particular attribute is contained in the dictionary. I am aware of Contains but I can't seem to reverse it if it makes sense.
If it were just one value I'd be fine but I need the list to go through the whole dictionary for each item in the list.
Currently I am using this:
foreach (var item in model)
{
if (dictionary.Values.Contains(object.Attribute))
{
list.Add(object);
}
}
Thank you!