Many C# Questions: Switching on non-constant values.

I finally decided to play with the style settings on my blog. As you may have guessed, I’m a bit of a newbie when it comes to websites and blogging. Let me know what you think of the new look. Last weeks posting generated some great comments. Tzagotta asks:   Why are constant expressions required in…

1

Many Questions: Switch On Enum

Just a quick one this week:    Why is it that you cannot use enum constants in a switch statement’s cases without first casting them to type int?   Often you will want to use Enum constants as case labels in switch statements. Sometimes, the compiler will complain and require a cast to int on…

16