Saturday, 12 July 2008

Flow control in C#

The goto statement has been abandoned in lots of programming languages, but do not know why MicroSoft pick it up again in C#.

labelName:

goto labelName


It has the normal if ... else ..., switch ... case ..., do ... while ..., and for. Just like Java or C/C++, it can be broken by break.

No comments: