Friday, September 26, 2008

The Lovely C# Switch Case

The Lovely C# Switch Case

One of the sweet things with a switch case statement in C# is that you have to specify the break statement or a goto statement and the fall through is a strictly no-no. The compiler would yell at you if skip the break statement.

Missing a break, continue statement is a common pitfall in switch construct is byfar the most common programming error that brings with it complicated debugging efforts and hidden bugs. With this cool power that C# compiler enforces, I think, we should also try ensuring that our programming practices in Java and JavaScript follow the same for cleaner and robust code.

No comments:

[Imported from Blogdrive]Online Virus Scanners

Online Virus Scanners Virus Scanners are no longer difficult to install, tedious to configure. There are easy to use Online Virus Scanne...