PC Review


Reply
Thread Tools Rate Thread

Compiler Error CS0163

 
 
Ramsey Schaffnit
Guest
Posts: n/a
 
      3rd Jan 2005
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.)


 
Reply With Quote
 
 
 
 
Ramsey Schaffnit
Guest
Posts: n/a
 
      3rd Jan 2005
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" <(E-Mail Removed)> wrote in message
news:%23%(E-Mail Removed)...
> 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.)
>
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Possible VS2003 c# compiler bug: error CS0584: Internal Compiler Error: stage 'COMPILE' symbol '' eblanco Microsoft Dot NET Framework 0 28th Jul 2006 09:40 PM
Compiler Error Message: The compiler failed with error code -1073741819 Ram Microsoft ASP .NET 0 13th Sep 2005 10:52 AM
fatal error C1001: INTERNAL COMPILER ERROR (compiler file 'f:\vs70builds\3077\vc\Compiler\Utc\src\P2\main.c', line 148) PufferFish Microsoft VC .NET 10 6th Aug 2004 10:33 PM
fatal error C1001: INTERNAL COMPILER ERROR (compiler file 'msc1.cpp', line 2701) =?Utf-8?B?TWFyY28gTm92YQ==?= Microsoft VC .NET 9 27th Apr 2004 06:55 PM
Compiler Error Message: The compiler failed with error code 128. Yan Microsoft ASP .NET 0 21st Jul 2003 11:49 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:00 PM.