dotnet / dotnet/dotnet-api-docs

mutable elements in HashSet

Open
#1,302 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

It appears the documentation for `HashSet` should include the same caveat as `Dictionary`: As long as an object is used as a key in the `Dictionary`, it must not change in any way that affects its hash value. Every key in a `Dictionary` must be unique according to the dictionary's equality comparer.

---
#### Document Details

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

* ID: 6b66ab1a-35aa-1bba-388c-30d698c1f50c
* Version Independent ID: d7dde1b9-fd16-dd30-6622-a15836579a9c
* Content: [HashSet<T> Class (System.Collections.Generic)](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.hashset-1?view=netframework-4.7.2#remarks)
* Content Source: [xml/System.Collections.Generic/HashSet`1.xml](https://github.com/dotnet/dotnet-api-docs/blob/master/xml/System.Collections.Generic/HashSet`1.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.