var hashSet = new HashSet<SomeAttribute>(); | |
typeof(SomeClass).GetCustomAttributes(false);//without this line, GetHashCode behaves as expected | |
SomeAttribute tt = new SomeAttribute(); | |
hashSet.Add(tt); | |
Console.WriteLine(hashSet.Contains(tt)); // Will display false | |
hashSet.Add(tt); | |
Console.WriteLine(hashSet.Contains(tt)); // Will display true | |
Console.WriteLine(hashSet.Count); // Will display 2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment