C# Break Statement

break-statements
In this chapter you will learn:

  • What is break statement in C#?
  • What is the functionality of break statement?
  • How to use break statement in programming?

The break statement is used to terminating the current flow of program and transfer controls to the next execution.

Example:

Output

0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
breaking the current segment…. __

Summary

In this chapter you learned what the break statement is in C# and how to use it in program. In next chapter you will learn about
continue statement in C#.

Write a Reply or Comment

Your email address will not be published.