Skip to content

Fix the CA1864 title to reference Dictionary.TryAdd - #56327

Open
AsadIqbal-Dev wants to merge 1 commit into
dotnet:mainfrom
AsadIqbal-Dev:fix-ca1864-title
Open

AsadIqbal-Dev wants to merge 1 commit into
dotnet:mainfrom
AsadIqbal-Dev:fix-ca1864-title

Conversation

@AsadIqbal-Dev

@AsadIqbal-Dev AsadIqbal-Dev commented Oct 6, 2026 •

Copy link
Copy Markdown

Summary

The CA1864 title referred to IDictionary.TryAdd(TKey, TValue), but IDictionary<TKey,TValue> doesn't define a TryAdd method. The rule applies to types that have their own TryAdd method, such as Dictionary<TKey,TValue>, and the rest of the page already links to Dictionary<TKey,TValue>.TryAdd.

This updates the title on the rule page and in the rule lists (index.md and performance-warnings.md), and fixes "It's is more efficient" in the same table rows.

The analyzer's own title is being fixed in dotnet/sdk#56511 (reported in dotnet/sdk#51141, where this docs page was also mentioned).


Internal previews

File Preview link
docs/fundamentals/code-analysis/quality-rules/ca1864.md Learn preview
docs/fundamentals/code-analysis/quality-rules/index.md Learn preview
docs/fundamentals/code-analysis/quality-rules/performance-warnings.md Learn preview

Build report

IDictionary<TKey,TValue> doesn't define a TryAdd method. The rule applies to types that have their own TryAdd method, such as Dictionary<TKey,TValue>. Also fix "It's is" in the rule list entries.
@AsadIqbal-Dev
AsadIqbal-Dev requested review from a team and gewarren as code owners October 6, 2026 01:08
@dotnetrepoman dotnetrepoman Bot added this to the October 2026 milestone Oct 6, 2026
@dotnet-policy-service dotnet-policy-service Bot added dotnet-fundamentals/svc community-contribution Indicates PR is created by someone from the .NET community. labels Oct 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-contribution Indicates PR is created by someone from the .NET community. dotnet-fundamentals/svc

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant