Skip to content

Don't guard Dictionary<K, V>.Remove(key) by ContainsKey(key) #33797

@terrajobst

Description

@terrajobst

The pair can be combined into just the Remove call.

Category: Performance

Metadata

Metadata

Assignees

Labels

api-approvedAPI was approved in API review, it can be implementedarea-System.Collectionscode-analyzerMarks an issue that suggests a Roslyn analyzercode-fixerMarks an issue that suggests a Roslyn code fixerin-prThere is an active PR which will close this issue when it is merged

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions