Skip to content

IDE0150: Prefer 'null' check over type check #10272

@siagupta0202

Description

@siagupta0202

Link to the issue description: https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0150

Overview

This style rule flags use of the is {type} statement when is not null can be used instead. Similarly, it flags use of the is not {type} statement in favor of is null. Using is null or is not null improves code readability.

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions