dotnet / dotnet/sdk

CA1864 has incorrect title

Open
#51,141 1 comment 1 reaction 0 assignees View on GitHub
Area-Microsoft.CodeAnalysis.NetAnalyzers documentation help wanted untriaged
Dominant language
C#
Stars
3.2k
Forks
1.3k
PR merge metrics
PR metrics pending

Description

The analyzer rule **CA1864** currently has the title:

> Prefer the ‘IDictionary.TryAdd(TKey, TValue)’ method

However, the `IDictionary` interface does not define a `TryAdd` method. The `TryAdd` method exists only on the `Dictionary` class (and a few other specific implementations).

This appears to be a typo or incorrect reference in the rule metadata or documentation. The intended title should likely be:

> Prefer the ‘Dictionary.TryAdd(TKey, TValue)’ method

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.