C# Null Checks and Argument Validation - The Wise Approach
Stop writing complex logic to validate your method arguments and use Guard, part of the .NET Community Toolkit. Guard is faster, less verbose, more expressive, and less error prone than manually writing checks and throwing exceptions. Today, I break down everything you need to know and how to get started. Links: Source code sample - https://github.com/jamesmontemagno/mv... Community Toolkit GitHub - https://github.com/communitytoolkit/d... Documentation - https://docs.microsoft.com/windows/co... Me and Sergio talking toolkit - • Introducing the .NET Community Toolkit - M... Join this channel to get access to perks: / @jamesmontemagno 👕 Buy some swag! - https://jamesmontemagno.myspreadshop.... ☕️ Buy me a coffee - https://www.buymeacoffee.com/jamesmon... Follow: 👨💻 GitHub: https://github.com/jamesmontemagno 🦜 Twitter: / jamesmontemagno 📄 Website: https://www.montemagno.com 📰 Newsletter: https://newsletter.montemagno.com/ Chapters: 00:00 - Intro 00:32 - .NET Community Toolkit Overview 01:20 - Why validate arguments with Guard 02:40 - Setting up diagnostics library 05:23 - Guard overview with demo 11:55 - Wrap-up and more community toolkit Disclaimer: This channel, videos, and streams are created in my spare time and are a product of me... James Montemagno! They are NOT officially affiliated or endorsed by Microsoft (my employer) in any way. Opinions and views are my own. What is on my hat? It is the CLE clothing logo because I am from Cleveland! Checkout their awesome CLE merch: https://cleclothingco.myshopify.com/ What is that art on my wall? It is an original piece from the French street artist Gregos of La Butte Montmartre: / bcez1onhiqx My Setup: 💡 Nanoleaf Elements Lights - https://amzn.to/3umwJVW 🎙 Blue Spark Microphone - https://amzn.to/3qgtYkq 🎙 Blue Pop Filter - https://amzn.to/3jEWM3r 🤳 Rode Microphone Arm - https://amzn.to/2Z68AlE 🎧 Sony MDR7306 Headphones - https://amzn.to/372jxta 📲 Stream Deck - https://amzn.to/373Uk1n 📹 Elgato Cam Link - https://amzn.to/3a9eGbh 📷 GoPro Hero - https://amzn.to/374lm90 🖱 MX Master 2S Mouse - https://amzn.to/3d7J2gj ⌨️ Tecware Phantom Keyboard - https://amzn.to/3aUP4y9 #csharp #dotnet #validation #guard

MVVM Source Generators: Never Write MVVM Boilerplate Code Again!

I am done with Golang

The Right Way to Check for Null in C#

How Much Memory for 1,000,000 Threads in 7 Languages | Go, Rust, C#, Elixir, Java, Node, Python

Reusable Controls and Data Template Selectors in Xamarin.Forms & .NET MAUI

Don't throw exceptions in C#. Do this instead

Why all your classes should be sealed by default in C#

What is the MVVM pattern, What benefits does MVVM have?

Union types in C# | DEM304

Correcting Common Async/Await Mistakes in .NET 8 - Brandon Minnick - Copenhagen DevFest 2023

10 C# Libraries To Save You Time And Energy

The AI Take Over Has Completely Backfired and I Can't Be Happier

Introducing the .NET Community Toolkit - MVVM, Performance, Diagnostics, & More

What are ASYNC and AWAIT in C#? Asynchronous Programming Tutorial

"Clean" Code, Horrible Performance

Passkeys Explained: Are They Actually Better Than Passwords?

Something is jamming GPS over Europe. Here's what we found

Creator of C++: Bell Labs, Negative Overhead Abstraction, Mistakes | Bjarne Stroustrup

The Ultimate Guide to Testing in .NET

