CSharp examples for Language Basics:break
break statement ends the execution of the body of an iteration or switch statement:
using System;//w w w .ja va 2s.c om class Test { static void Main(){ int x = 0; while (true) { if (x++ > 5) break ; // break from the loop } // execution continues here after break } }