dotnet / dotnet/dotnet-api-docs

Generic dictionary: confusing note about key uniqueness

Open
#1,570 0 comments 0 reactions 0 assignees View on GitHub
area-System.Collections dotnet-api/prod Pri2 untriaged
Dominant language
C#
Stars
949
Forks
1.7k
Avg merge
3d 27m
Merged PRs (30d)
49

Description

The very last note at the [Remarks section](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.dictionary-2?view=netframework-4.7.2#remarks) is confusing:
>Because keys can be inherited and their behavior changed, their absolute uniqueness cannot be guaranteed by comparisons using the [Equals](https://docs.microsoft.com/en-us/dotnet/api/system.type.equals?view=netframework-4.7.2) method.

What is "absolute uniqueness" here? Why does it refer to the `Type.Equals` method (it's `` in the source )?! Why is it at the end of the section, being not related to the preceding text?

I'm willing to make it clearer and move to a more proper location. However, I don't understand yet the intention of this note.

---
#### Document Details

⚠ *Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.*

* ID: f92d0ebc-8435-e40b-9e5c-254019e09c99
* Version Independent ID: 766b355d-864b-848f-0791-55e7f6c7a751
* Content: [Dictionary<TKey,TValue> Class (System.Collections.Generic)](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.dictionary-2?view=netframework-4.7.2#remarks)
* Content Source: [xml/System.Collections.Generic/Dictionary`2.xml](https://github.com/dotnet/dotnet-api-docs/blob/master/xml/System.Collections.Generic/Dictionary`2.xml)
* Product: **dotnet-api**
* GitHub Login: @mairaw
* Microsoft Alias: **mairaw**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.