dotnet / dotnet/dotnet-api-docs

ConcurrentDictionary Constructor IEqualityComparer Can Be Null

Open
#9,956 3 comments 0 reactions 0 assignees View on GitHub
area-System.Collections Pri3
Dominant language
C#
Stars
949
Forks
1.7k
Avg merge
3d 27m
Merged PRs (30d)
49

Description

I don't know when it changed, but at least as of .NET 8, the `ConcurrentDictionary` constructors that accept `IEqualityComparer` comparers allow `null`--it uses `EqualityComparer.Default` in that case--but the documentation incorrectly says if you tried that you'd get an `ArgumentNullException`.

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.