Posted on

Since C# gives you the ability to change the behavior of built-in operator, it’s possible the if (x == null) syntax doesn’t actually do what you think it does.

To combat this, you can use is null or is not null to see if something truly is null.

View code on GitHub

Leave a Reply

Your email address will not be published. Required fields are marked *