Skip to content

Enable CA1854 analyser #42008

Closed
Closed
@martincostello

Description

@martincostello

I spotted a new analyser being dogfooded in dotnet/runtime#70157 that suggests using TryGetValue() on dictionaries over ContainsKey() & the indexer.

I've spotted a few uses of the latter pattern in the repo from time to time, so it would be good to enable that analyser and fix-up any warnings from it once the relevant change has been ingested into this repo.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-infrastructureIncludes: MSBuild projects/targets, build scripts, CI, Installers and shared framework

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions