Case statement puzzle

This is a discussion on Case statement puzzle within the C# Programming forums, part of the General Programming Boards category; Can someone tell me what's wrong with this block of skeleton code so far??
Code:
protected override void WndProc(ref Message ...

That exception is thrown if the label ("default" in this instance) does not terminate, however you have a break so I find it most bizarre that this is happening.

For what it's worth, you don't strictly need to use the default label. You could terminate the function if one of your two labels are detected, or otherwise allow your default label code to occur outside of the switch. Example:

Thanks.
I actually added the default (Contextually a logical error as it causes an infinite loop) to see if I could solve a previous error as it ws giving me the same error message with my last case statement. In any case I just rewrote my code the exact same way and it worked!!
Yes even I'm puzzled. o_0?

Thanks.
I actually added the default (Contextually a logical error as it causes an infinite loop) to see if I could solve a previous error as it ws giving me the same error message with my last case statement. In any case I just rewrote my code the exact same way and it worked!!
Yes even I'm puzzled. o_0?

I think some part of "exact" wasn't as exact as you wanted it to be - I've been there and done that MANY times.