>>we had coding hints to ALWAYS use braces, as the single line might not stay single forever ;-)
>>(and maintainance dev were expected to miss missing curly braces)
>
>Me too. I was also told to always do this:
>
int foo(int x)
>{
> .
> .
> switch (x)
> {
> case 4:
> return -1;
> break; // Always include a break in a case statement
> .
> .
> .
> }
>}
>
>It's simple: some things we were taught by well-meaning people were just plain wrong. :-)
C# won't compile if there isn't a 'break;'