469,902 Members | 2,003 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,902 developers. It's quick & easy.

Compiler Error CS0163

Documentation for error message Compiler Error CS0163 says:
Control cannot fall through from one case label ('label') to another

Ok, fine.

Documentation for switch statement says the same thing, but ALSO says:

Although fall through from one case label to another is not supported, it is
allowed to stack case labels, for example:
case 0:
case 1:
// do something;

In the event, my code gets the CS0163 error on the following:

switch {

case dbType.dbtOracle:

case dbType.dbtOracleMS:

blah, blah;

}

So what's right? (And, yes, dbType is an enum.)
Nov 16 '05 #1
1 4400
It wasn't the code I showed that caused the error - it was what came, or
rather DIDN'T come, next. I had no break following the second case. I'll
try to claim it was the enum that confused me.

"Ramsey Schaffnit" <ra****@edge.com> wrote in message
news:%2******************@TK2MSFTNGP12.phx.gbl...
Documentation for error message Compiler Error CS0163 says:
Control cannot fall through from one case label ('label') to another

Ok, fine.

Documentation for switch statement says the same thing, but ALSO says:

Although fall through from one case label to another is not supported, it is allowed to stack case labels, for example:
case 0:
case 1:
// do something;

In the event, my code gets the CS0163 error on the following:

switch {

case dbType.dbtOracle:

case dbType.dbtOracleMS:

blah, blah;

}

So what's right? (And, yes, dbType is an enum.)

Nov 16 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

10 posts views Thread by Bjorn | last post: by
2 posts views Thread by Mary | last post: by
reply views Thread by rollasoc | last post: by
1 post views Thread by Ayende Rahien | last post: by
3 posts views Thread by Mark Rockman | last post: by
4 posts views Thread by David Sworder | last post: by
1 post views Thread by Waqarahmed | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.