dotnet / dotnet/dotnet-api-docs

Docs for all overloads of ToFrozenDictionary should contain the same remark.

Open
#11,019 1 comment 1 reaction 0 assignees View on GitHub
area-System.Collections untriaged
Dominant language
C#
Stars
949
Forks
1.7k
Avg merge
3d 27m
Merged PRs (30d)
49

Description

### Type of issue

Missing information

### Description

Look at the remarks section [of this `ToFrozenDictionary()` overload](https://learn.microsoft.com/en-us/dotnet/api/system.collections.frozen.frozendictionary.tofrozendictionary?view=net-9.0#system-collections-frozen-frozendictionary-tofrozendictionary-2(system-collections-generic-ienumerable((system-collections-generic-keyvaluepair((-0-1))))-system-collections-generic-iequalitycomparer((-0)))).

> If the same key appears multiple times in the input, the last one in the sequence takes precedence. This differs from [ToDictionary](https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.todictionary?view=net-9.0), where duplicate keys result in an exception.

It's absent in other overloads.

### Page URL

https://learn.microsoft.com/en-us/dotnet/api/system.collections.frozen.frozendictionary.tofrozendictionary?view=net-9.0#system-collections-frozen-frozendictionary-tofrozendictionary-2(system-collections-generic-ienumerable((system-collections-generic-keyvaluepair((-0-1))))-system-collections-generic-iequalitycomparer((-0)))

### Content source URL

https://github.com/dotnet/dotnet-api-docs/blob/main/xml/System.Collections.Frozen/FrozenDictionary.xml

### Document Version Independent Id

569b00fd-bc37-36af-1883-37c9d7666ad4

### Article author

@dotnet-bot

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.