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

IDEs and code editors

Tools

Rules

Related communities

founded 2 years ago
MODERATORS
top 2 comments
sorted by: hot top controversial new old
[โ€“] tamlyn@lemmy.zip 1 points 4 months ago (1 children)

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.

[โ€“] SmartmanApps@programming.dev 3 points 4 months ago

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.