Re: Funny loop with post-increment.
Brady Kelly <[email protected]> Tue, 19 Feb 2008 13:26:48 +0200
| Newsgroups | gmane.comp.windows.devel.dotnet.clr |
|---|---|
| Message-ID | <[email protected]> |
> switch(n){
> case 1:
> case 2:
> Console.WriteLine("a");
> case 3:
> Console.WriteLine("b");
> }
>
> would be perfectly fine. As there's no fall through after code
> blocks,
> the block of case 1/2 won't end up in the block of case 3. However
> 'break' is
> required after the code of case 2.
>
> Anyway, it's never going to change :)
>
> FB
The uninvited 'break' is even required after the code of case 3.
===================================
This list is hosted by DevelopMentorĀ® http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com