© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Search
Star
Feedback
Setup for Free
C
C#
•
4y ago
•
1 reply
surwren
Proper C multicatch syntax
I saw in Java that you can do multicatch blocks
(see image
)
I also looked it up on stackoverflow
:
https://stackoverflow.com/questions/136035/catch-multiple-exceptions-at-once
However there seems to be several methods listed in the thread
.
What
's the c
# convention for multicatch blocks
?
Stack Overflow
Catch multiple exceptions at once?
It is discouraged to simply catch System
.Exception
. Instead
, only the
"known
" exceptions should be caught
.
Now
, this sometimes leads to unnecessary repetitive code
, for example
:
try
{
.
.
.
C#
Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Similar Threads
Was this page helpful?
Yes
No
Recent Announcements
Similar Threads
✅ What syntax for c#?
C
C# / help
2y ago
Proper syntax (or usage) for unsigned int
C
C# / help
4y ago
JavaScript Framework with C# syntax
C
C# / help
2y ago
Syntax for c# to do this?
C
C# / help
2y ago