dotnet / dotnet/csharpstandard

Potentially replace null checks with "is null" when we have pattern matching

Open
#328 0 comments 0 reactions 0 assignees View on GitHub
type: clarity
Dominant language
C#
Stars
815
Forks
99
Avg merge
1d 14h
Merged PRs (30d)
16

Description

When introducing null conditional operators (#7 and #251) there are various parts like this:

```csharp
((object)P == null)
```

Those can be replaced with:

```csharp
P is null
```

when we introduce pattern matching. There may be other places where this is useful too.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.