I created a generic class and created multiple instances with the same data. When adding them to a set, since the objects are different, all objects are added to the set even though they all contain the same data. Is there a way to make the set compare the data rather than the objects themselves when adding to the set so that the data in the set is unique?
Asked
Active
Viewed 19 times