Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Tracked by #10270
siagupta0202 opened this issue Jan 13, 2025 · 0 comments · May be fixed by #10185
Open
Tracked by #10270

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

siagupta0202 opened this issue Jan 13, 2025 · 0 comments · May be fixed by #10185
Assignees
Labels
area-Styling Indicates if an issue or a PR is for style changes 🚧 work in progress

Comments

@siagupta0202
Copy link
Contributor

siagupta0202 commented Jan 13, 2025

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.

@siagupta0202 siagupta0202 self-assigned this Jan 13, 2025
@siagupta0202 siagupta0202 changed the title IDE0150 IDE0150: Prefer 'null' check over type check Jan 15, 2025
@siagupta0202 siagupta0202 added the area-Styling Indicates if an issue or a PR is for style changes label Jan 15, 2025
@siagupta0202 siagupta0202 linked a pull request Jan 15, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Styling Indicates if an issue or a PR is for style changes 🚧 work in progress
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant