Stacking Cases in a Switch Statement

I keep getting errors when trying to create a switch statement where multiple cases result in the same code without having to rewrite the case code. For example:

switch(someVar) {
    case "Hello":
    case "Hi":
    case "Heya":
        doSomething();
        break;
    case "Goodbye":
        doSomethingElse();
        break;
    default:
        doSomethingOther();
}

Throws an error saying that the second case is unexpected. I've since rewritten it to work just fine, but I wanted to ask for future reference: is there something I'm missing or is Unity just not designed to work like this?

That does work in Unity 3. In Unity 2.6, you can do this (Unityscript, not C#):

switch(someVar) {
    case "Hello":;
    case "Hi":;
    case "Heya":
        doSomething();
        break;
    // etc.

Stacking cases like that in C# is just fine. As far as I can see, the only error is that you're missing the last "break" which follows the default case.

Even though this is the last case, you still need a break at the end of it!

someone can help me? i like know how does that in the Unity 3.3! I like use "case" in my game. Please Help!

you need breaks under every case, including default