I have a `Dictionary` with a custom hashing function. I want to test the hash function, because even though it returns *different hash* results for my test values, ***some of them may still map to the same bucket due to the [modulo `%` operation](https://referencesource.microsoft.com/#mscorlib/system/collections/generic/dictionary.cs,304)***. So how to check if there are collisions in C# `Dictionary` with custom hash function and improve that function?

This is a ***development test*** to fine-tune the hash function and **won't go into production** so no worries about the changes in internal implementation in other versions!!!

In C++ it's possible to [get the map's bucket size](https://stackoverflow.com/q/46137811/995714) to check the collision status but I couldn't find a way to do that in C#. How can I know if `Dictionary` has been collided?