You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Prefer the ‘IDictionary.TryAdd(TKey, TValue)’ method
However, the IDictionary<TKey, TValue> interface does not define a TryAdd method. The TryAdd method exists only on the Dictionary<TKey, TValue> 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
Activity
xtqqczze commentedon Oct 7, 2025
There is a similar issue in the documentation: https://github.com/dotnet/docs/blob/main/docs/fundamentals/code-analysis/quality-rules/ca1864.md