Before using Kitpon's solution, think about using a Set rather than a List, it ensures each element is unique.
As most list operations (foreach, map, filter, ...) are the same for sets and lists, changing collection could be very easy in the code.