Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Switch Case Statements
Message
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00929985
Message ID:
00929990
Views:
7
Eric,

To the best of my awareness, the C# 'case' statement only works with a constant expression. In your example, each case statement needs to refer to an integer, not a boolean.

So unless anyone knows of a more elegant way, you'd have to test each value independently.

Kevin
Previous
Reply
Map
View

Click here to load this message in the networking platform