You could use a switch with an enum. This could be an option if you want to reuse the conditions and keep the switch short.
Here is a simplified example. Please note that I do not advocate this pattern, but it might be appropriate in some cases.
posted 11 months ago
Clever idea. I am not sure that is what an enum was intended for, however.
I was born with webbed fish toes. This tiny ad is my only friend: