Monday, November 24, 2008

Looping

By using loop technique you can repeat operation as many time as you want.So you do not write the same code each time.

So we can categorized the main type of loop techniques that are use in C# as follows.

1. do-while loop

2. while loop

3. for loop

Interrupting Loops


Some times you want finger-grained control over the processing of looping code. There are 4 kinds of command in C# to do that task.

1. break - Causes the loop to end immediately

2. continue - Causes the current loop cycle to end immediately

3. goto - Allows jumping out of a loop to a labeled position

4. return - Jumps out of the loop and its containing function



2 comments:

Chathura Jeewantha Ranasingha said...

Nice informative stuff.

ranasiri said...

Wow. it is a great job. Keep it up.