The break statement
The break statement is used to break out of an iteration statement block:
int MyVariable = 0;
while(MyVariable < 10)
{
System.Console.WriteLine(MyVariable);
if(MyVariable == 5)
break;
MyVariable++;
}
System.Console.WriteLine("Out
of the loop.");
The preceding code prints the following to the console:
0
1
2
3
4
Out of the loop.
The continue statement
The continue statement returns control to the Boolean expression that controls
an iteration statement.
int MyVariable;
for(MyVariable = 0; MyVariable < 10; MyVariable++)
{
if(MyVariable == 5)
continue;
System.Console.WriteLine(MyVariable);
}
The preceding code prints the following to the console:
0
1
2
3
4
6
7
8
9
Main difference is
- Break statement is break the iteration statement
- The continue statement returns control to the Boolean expression that controls an iteration stateme

Shobhit KaushikPosted Mar 8, 2016, 4:06 AM
Very good
Christopher AndrewsPosted Nov 18, 2015, 1:16 AM
Good Stuff. Thanks for sharing. We just checked out www.redfly.io. It is very easy to configure (just one line) with any .net app to track errors. Simple and nice!