
How expensive is throwing exceptions in .NET - and does it actually matter?
If you’ve been developing in .NET for a while, you’ve probably come across the Result type: an error-as-value representation of either success or failure, often modeled as a discriminated union in languages that support them directly. Developers working with functional programming languages typically take discriminated unions for granted, using them extensively during their work. In contrast, developers using object-oriented languages such as C# are often introduced to Result types as another programming pattern that can be used instead of exceptions. ...

