53GB

ArgumentNullExceptions in C# with Just 1 Line of Code!



ArgumentNullExceptions in C# with Just 1 Line of Code!

I guarantee this will reduce the lines of code in your codebase! Do CTRL/CMD + F for ArgumentNullException and replace it with the method in this video 🀯

With this you can check and throw, if needed, an ArgumentNullException with just 1 line of code.

πŸ’ Join this channel to get access to perks:
https://www.youtube.com/channel/GeraldVersluis/join

Disclaimer: this channel is done on personal title, in my free time, and not officially affiliated with or endorsed by Microsoft (my employer) in any way. Opinions and views are my own.

πŸ›‘ Don’t forget to subscribe to my channel for more cool content: https://www.youtube.com/GeraldVersluis/?sub_confirmation=1

🐦 Follow me on Twitter: https://twitter.com/jfversluis
🀝 Join the Discord server: https://discord.gg/2cAyTGNHBD

πŸ”— Links
C# 10 ArgumentNullException Documentation: https://learn.microsoft.com/dotnet/api/system.argumentnullexception.throwifnull?view=net-7.0

⏱ Timestamps
0:00 – ArgumentNullException.ThrowIfNull()
0:08 – How You’re Checking for Null Now
0:23 – Use ArgumentNullException.ThrowIfNull or ThrowIfNullOrEmpty

πŸŽ₯ Video edited with Camtasia (ref): https://techsmith.z6rjha.net/AJoeD

πŸ™‹β€β™‚οΈ Also find my…
Blog: https://blog.verslu.is
Twitch: https://twitch.tv/jfversluis
All the rest: https://jfversluis.dev

#csharp #argumentnullexception #exceptionhandling #dotnet

Exit mobile version