Creating Custom C# Exception Types
New and old ways of creating your own exceptions in dotnet with C# 11 and .NET 7
Let’s talk about building custom exceptions in C# code and why you’d want to do that. We’ll cover the traditional way as well as a newer way you might want to do this using the required
keyword in C# 11.