I have a dictionary
Dictionary<Enum, List<string>> test = new();
I would like to check if the value (List) of this dictionary has duplicates on a specific key.
Dictionary[Key1] = [x, x, y, z] –> this should return that the list on this key has duplicates.
Dictionary[Key2] = [x]
Dictionary[Key3] = [x, y, z]
2
Answers
Something like this.
You might need to check more closely what duplicate means thought. Things like casing etc.
You can do it with a lambda function