break:终端循环。 Continue:中断本次循环。Return:结束方法。
例:
for (int i = 0; i < 3; i++)
{
Console.WriteLine(i);
break;
Console.WriteLine("aa");//不执行
}
Console.WriteLine("after for");//输出结果:0
after for
for (int i = 0; i < 3; i++)
{
Console.WriteLine(i);
continue;
Console.WriteLine("aa");//中断本次循环,不执行aa
}
Console.WriteLine("after for");
输出结果:0
1
2
after for