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
The rule has already been suggested in the .NET repository dotnet/runtime#33798 and will be probably available in Microsoft.CodeAnalysis.FxCopAnalyzers in a few weeks/months. I don't want to implement a rule that is available in FxCop or will be available in this analyzer because it would just be duplicated work.
I never wrote an analyzer, so I am not certain of what is possible api-wise, but I think this perf rule could be useful:
When the dictionary value is a reference type and a ContainsKey is followed by a lookup:
It should suggest the use of TryGetValue:
The text was updated successfully, but these errors were encountered: