What about a template case?
template
switch (number) { template: before: // do something before after: // do something after case 1: // ... template case 2: // ... template case 3: // ... case 4: // ... default: // ... }
template could be applied to only a particular subset of cases, and the template definition could be extended to do exception handling, etc.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
What about a
template
case?template
could be applied to only a particular subset of cases, and thetemplate
definition could be extended to do exception handling, etc.