So if i want to handle different status code, is several exception filters or if statements cleaner. I just remember a colleague has done that in the past with if statements.
this post was submitted on 01 Sep 2025
7 points (100.0% liked)
C Sharp
1754 readers
1 users here now
A community about the C# programming language
Getting started
Useful resources
- C# documentation
- C# Language Reference
- C# Programming Guide
- C# Coding Conventions
- .NET Framework Reference Source Code
IDEs and code editors
- Visual Studio (Windows/Mac)
- Rider (Windows/Mac/Linux)
- Visual Studio Code (Windows/Mac/Linux)
Tools
Rules
- Rule 1: Follow Lemmy rules
- Rule 2: Be excellent to each other, no hostility towards users for any reason
- Rule 3: No spam of tools/companies/advertisements
Related communities
founded 2 years ago
MODERATORS
Probably debatable. I think he was more addressing when you need to pull out a specific exception this is a cleaner way to do it. Saves having to rethrow the exception.