Open
Description
Type of issue
Missing information
Description
I spent a good deal of time trying to understand why my Distinct operations were not working for a newly created Type.
It turns out that the HashCode.Combine(collection); does not work, it works fine when the instances passed in are not collections, but the documentation doesn't say that clearly.
In my opinion there should be a type check in the method itself as this makes the code very dangerous as only at runtime the issue can be discovered.
I found it just because I was testing most of the equality features around my new type.
I'd be happy to know if I am missing something
Page URL
Content source URL
https://github.com/dotnet/dotnet-api-docs/blob/main/xml/System/HashCode.xml
Document Version Independent Id
4b23ab47-87c7-32b1-a0ca-9c13d5ec93e5