Click here to Skip to main content
15,888,984 members
Home / Discussions / C#
   

C#

 
GeneralRe: Control cannot fall through from one case label ('case 64:') to another? Pin
dec8215-Mar-09 18:55
dec8215-Mar-09 18:55 
GeneralRe: Control cannot fall through from one case label ('case 64:') to another? Pin
S. Senthil Kumar15-Mar-09 19:10
S. Senthil Kumar15-Mar-09 19:10 
GeneralRe: Control cannot fall through from one case label ('case 64:') to another? Pin
Christian Graus15-Mar-09 19:12
protectorChristian Graus15-Mar-09 19:12 
GeneralRe: Control cannot fall through from one case label ('case 64:') to another? Pin
dec8215-Mar-09 19:16
dec8215-Mar-09 19:16 
GeneralRe: Control cannot fall through from one case label ('case 64:') to another? Pin
S. Senthil Kumar15-Mar-09 19:45
S. Senthil Kumar15-Mar-09 19:45 
GeneralRe: Control cannot fall through from one case label ('case 64:') to another? Pin
Dave Kreskowiak15-Mar-09 20:23
mveDave Kreskowiak15-Mar-09 20:23 
GeneralRe: Control cannot fall through from one case label ('case 64:') to another? Pin
Christian Graus15-Mar-09 20:33
protectorChristian Graus15-Mar-09 20:33 
AnswerRe: Control cannot fall through from one case label ('case 64:') to another? Pin
Megidolaon16-Mar-09 1:49
Megidolaon16-Mar-09 1:49 
Actually break; cause the switch to exit and continue with the codoe afterwards.
Leaving it and not writing anything, but simply adding other case will automatically cause the switch to move on and execute all code until the next break;

Thus if you have somethng like this:
switch(number)
   case 1: //do stuff
     break;

   case 2:  //do stuff or not
   case 3: // do more stuff
      break;
   
   case 4: //do stuff
      break;
the program will do the exact same for 2 and 3.
If you don't want it to do anything different for 2, you might as well leave that case empty, so it immediately goes to the next code before the break;
QuestionMake Transparent....??? Pin
S K Y15-Mar-09 16:44
S K Y15-Mar-09 16:44 
AnswerRe: Make Transparent....??? Pin
Christian Graus15-Mar-09 18:36
protectorChristian Graus15-Mar-09 18:36 
GeneralRe: Make Transparent....??? Pin
S K Y15-Mar-09 21:13
S K Y15-Mar-09 21:13 
AnswerRe: Make Transparent....??? Pin
#realJSOP16-Mar-09 2:53
mve#realJSOP16-Mar-09 2:53 
GeneralRe: Make Transparent....??? Pin
S K Y16-Mar-09 14:52
S K Y16-Mar-09 14:52 
GeneralRe: Make Transparent....??? Pin
#realJSOP18-Mar-09 1:22
mve#realJSOP18-Mar-09 1:22 
QuestionGridView and SEO Pin
Feddo0415-Mar-09 15:13
Feddo0415-Mar-09 15:13 
AnswerRe: GridView and SEO Pin
Colin Angus Mackay15-Mar-09 15:47
Colin Angus Mackay15-Mar-09 15:47 
GeneralRe: GridView and SEO Pin
Feddo0415-Mar-09 16:04
Feddo0415-Mar-09 16:04 
GeneralRe: GridView and SEO Pin
Colin Angus Mackay15-Mar-09 16:11
Colin Angus Mackay15-Mar-09 16:11 
GeneralRe: GridView and SEO Pin
Feddo0420-Mar-09 5:09
Feddo0420-Mar-09 5:09 
QuestionObjects on another form Pin
Jon Henry15-Mar-09 13:45
Jon Henry15-Mar-09 13:45 
AnswerRe: Objects on another form Pin
Christian Graus15-Mar-09 14:11
protectorChristian Graus15-Mar-09 14:11 
GeneralRe: Objects on another form Pin
Jon Henry15-Mar-09 14:30
Jon Henry15-Mar-09 14:30 
GeneralRe: Objects on another form Pin
Christian Graus15-Mar-09 18:39
protectorChristian Graus15-Mar-09 18:39 
AnswerRe: Objects on another form Pin
Natza Mitzi15-Mar-09 21:23
Natza Mitzi15-Mar-09 21:23 
Questionbind property to selected row from datagridview Pin
jogisarge15-Mar-09 10:15
jogisarge15-Mar-09 10:15 

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.