Click here to Skip to main content
15,893,266 members
Home / Discussions / C#
   

C#

 
GeneralRe: Control cannot fall through from one case to another? Pin
Lutosław13-May-09 8:53
Lutosław13-May-09 8:53 
GeneralRe: Control cannot fall through from one case to another? Pin
OriginalGriff13-May-09 8:55
mveOriginalGriff13-May-09 8:55 
AnswerRe: Control cannot fall through from one case to another? Pin
0x3c013-May-09 0:08
0x3c013-May-09 0:08 
GeneralRe: Control cannot fall through from one case to another? Pin
Luc Pattyn13-May-09 1:20
sitebuilderLuc Pattyn13-May-09 1:20 
GeneralRe: Control cannot fall through from one case to another? Pin
OriginalGriff13-May-09 2:10
mveOriginalGriff13-May-09 2:10 
GeneralRe: Control cannot fall through from one case to another? Pin
PIEBALDconsult13-May-09 3:38
mvePIEBALDconsult13-May-09 3:38 
GeneralRe: Control cannot fall through from one case to another? Pin
molesworth13-May-09 4:29
molesworth13-May-09 4:29 
AnswerRe: Control cannot fall through from one case to another? [modified] Pin
Paulo Zemek13-May-09 3:38
mvaPaulo Zemek13-May-09 3:38 
I wrote this code to test:

int i=int.Parse(Console.ReadLine());
switch(i)
{
case 0:
Console.WriteLine(0);
goto case 1;

case 1:
Console.WriteLine(1);
break;
}


This works. If you don't do the goto case 1 you will receive an error, and if you don't do the break at case 1 you will also receive an error.

I think the problem with your code is the lack of some "goto case x" or some "break".

--- I don't like such gotos, but if that the best way, try finding the lacking gotos / breaks.

modified on Wednesday, May 13, 2009 10:06 AM

GeneralRe: Control cannot fall through from one case to another? [modified] Pin
Paulo Zemek13-May-09 3:45
mvaPaulo Zemek13-May-09 3:45 
GeneralRe: Control cannot fall through from one case to another? Pin
Luc Pattyn13-May-09 3:46
sitebuilderLuc Pattyn13-May-09 3:46 
GeneralRe: Control cannot fall through from one case to another? Pin
Paulo Zemek13-May-09 3:51
mvaPaulo Zemek13-May-09 3:51 
GeneralRe: Control cannot fall through from one case to another? Pin
OriginalGriff13-May-09 5:57
mveOriginalGriff13-May-09 5:57 
AnswerRe: Control cannot fall through from one case to another? Pin
Lutosław13-May-09 8:38
Lutosław13-May-09 8:38 
QuestionDynamic Property in C# Pin
lnmca12-May-09 22:24
lnmca12-May-09 22:24 
AnswerRe: Dynamic Property in C# Pin
DaveyM6912-May-09 22:50
professionalDaveyM6912-May-09 22:50 
JokeRe: Dynamic Property in C# Pin
Giorgi Dalakishvili12-May-09 23:26
mentorGiorgi Dalakishvili12-May-09 23:26 
GeneralRe: Dynamic Property in C# Pin
DaveyM6913-May-09 2:29
professionalDaveyM6913-May-09 2:29 
QuestionEdit file as Pin
pedersen-roxen12-May-09 21:50
pedersen-roxen12-May-09 21:50 
Questionbackup database from a distant server with sql server 2000 Pin
adsana12-May-09 21:26
adsana12-May-09 21:26 
QuestionDynamically ENUM Pin
lnmca12-May-09 19:13
lnmca12-May-09 19:13 
AnswerRe: Dynamically ENUM Pin
N a v a n e e t h12-May-09 19:17
N a v a n e e t h12-May-09 19:17 
GeneralRe: Dynamically ENUM Pin
PIEBALDconsult13-May-09 13:57
mvePIEBALDconsult13-May-09 13:57 
AnswerRe: Dynamically ENUM Pin
zlezj12-May-09 23:02
zlezj12-May-09 23:02 
AnswerRe: Dynamically ENUM Pin
Guffa13-May-09 0:48
Guffa13-May-09 0:48 
AnswerRe: Dynamically ENUM Pin
Paulo Zemek13-May-09 9:00
mvaPaulo Zemek13-May-09 9:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.