catch case as a shorthand for catch and switch case #2688
Replies: 3 comments
-
How is this an advantage over exception filters ( |
Beta Was this translation helpful? Give feedback.
-
@yaakov-h Sorry I use the wrong words there. What I meant actually is But also I wonder that |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
As of now C#
switch
syntax has extended to support many kind of expression. I think it was so overlapped with the oldcatch
syntaxIt actually could replace with switch
And I think we could also make the shorthand syntax for convenient
The advantage of
switch
is it could fall through and could specify additionalwhen
. And it will support all kind ofswitch
expression today and future, we don't need to extend support tocatch
syntax. It just transpiled intoswitch
Beta Was this translation helpful? Give feedback.
All reactions