Writing new guards with extensions in C# 14
In C# we have many nice guards sitting on top of static exceptions classes like ArgumentNullException
, ArgumentOutOfRangeException
, etc: As ArgumentException.ThrowIfNullOrEmpty
, ArgumentException.ThrowIfNullOrWhiteSpace
. Now we can extend them easily!