This shows you the differences between two versions of the page.
|Both sides previous revision Previous revision|
notes:csharp:equality [2020/06/30] (current)
|Line 154:||Line 154:|
|dictionary.Add(c2, empl);||dictionary.Add(c2, empl);|
|+||A commonly used algorithm to generate the **uniform distribution** of keys is to XOR all the return values from ''%%GetHashCode%%'' on all immutable fields in a type. Keep in mind that if the fields' values are somehow related, this algorithm will cluster hash codes. As a result, your container will have few buckets each with many items.|