See
C# switch statement limitations – why?
Basically Switches cannot have evaluated statements in the case statement. They must be statically evaluated.
More Related Contents:
- C# Switch Randomized [closed]
- Is there a better alternative than this to ‘switch on type’?
- Is “else if” faster than “switch() case”? [duplicate]
- C# switch statement limitations – why?
- Is there any significant difference between using if/else and switch-case in C#?
- Switch statement fallthrough in C#?
- Multiple cases in switch statement
- Is there any benefit to this switch / pattern matching idea?
- If vs. Switch Speed
- C# switch on type [duplicate]
- Why switch for enum accepts implicit conversion to 0 but no for any other integer?
- Switch case: can I use a range instead of a one number [duplicate]
- Variable declaration in a C# switch statement [duplicate]
- Using Case/Switch and GetType to determine the object [duplicate]
- How to make C# Switch Statement use IgnoreCase
- Control cannot fall through from one case label
- Case Statement Block Level Declaration Space in C#
- Are .Net switch statements hashed or indexed?
- C# – Which is the best alternative to ‘switch on type’? [duplicate]
- How to switch between “possible” type of an object? [duplicate]
- Switch case on type c# [duplicate]
- In a switch vs dictionary for a value of Func, which is faster and why?
- Why is this switch on type case considered confusing?
- How can I build XML in C#?
- Card Shuffling in C#
- “Invalid provider type specified” CryptographicException when trying to load private key of certificate
- How to do #ifdef in C#
- Route parameter with slash “/” in URL
- Is it Possible to Return a Reference to a Variable in C#? [duplicate]
- Copy the property values to another object with C# [duplicate]