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
incorrect suggestion of CA1854 Prefer a "TryGetValue" call over a Dictionary indexer access guarded by a "ContainsKey" check to avoid double lookup
#7295
Open
wstaelens opened this issue
Apr 17, 2024
· 0 comments
· May be fixed by #7309
Analyzer
Diagnostic ID: CA1854 Prefer a "TryGetValue" call over a Dictionary indexer access guarded by a "ContainsKey" check to avoid double lookup
Analyzer source
latest .net 8 version and vs pro 2022 17.9.6
Describe the bug
it suggest to do a trygetvalue and use value but doesn't see that
PermissionsData.ContainsKey(objId)
andotherP.PermissionsData[objId]
are different.The text was updated successfully, but these errors were encountered: