Posted by : Sudhir Chekuri Thursday, 31 December 2015

C# provides a jump statements that allow you to jump immediately to another line in a program.

They are:

1. goto

2. break

3. continue

goto

It allows you to jump directly to another specified line in the program indicated by a label which is an identifier followed by a semi colon;

break

It is used to exit from a case in switch statement.

It is used to exit from loops like for, for each, while and do while which will switch the control to the statement immediately after the end of the loop.

continue

This can be used only in loops which will jump the control to the iteration part without executing the statements present after it.

Leave a Reply

Subscribe to Posts | Subscribe to Comments

Followers

Total Pageviews

Powered by Blogger.

Blog Archive

- Copyright © 2013 DevStudent - Metrominimalist - Powered by Blogger - Designed by Johanes Djogan -