Correctly Checking for Null in C# #shorts #programming #csharp
You may have heard that is null is better than == null, but do you know why?
Starting with C# 7 the pattern matching in C# let you compare to the constant value null instead of doing an equality comparison.
Sample Code Used in the Video: https://github.com/DevChatter/YouTubeSamples/tree/main/CSharp/CSharpSamples/CSharpSamples
Watch our live stream at https://www.twitch.tv/devchatter
Chat with us on Discord - https://discord.gg/aQry9jG
Contribute on GitHub - https://github.com/DevChatter/
Support DevChatter through Patreon - https://www.patreon.com/DevChatter
Follow Brendan on Twitter - https://twitter.com/brendoneus
Brendan's Pluralsight Courses - https://www.pluralsight.com/authors/brendan-enrick
#shorts
#programming
#csharp
#Coding
#dotnet
#Tutorial