Break statement in switch statement
What does a break statement do in the switch statement?
Expert
Switch statement is the selection control statement that is used to handle multiple choices and transfer control to the case statements within its body. The following code snippet shows an example of the use of the switch statement in C#:
switch(choice) { case 1: console.WriteLine("First"); break; case 2: console.WriteLine("Second"); break; default: console.WriteLine("Wrong choice"); break; }
In switch statements, the break statement is used at the end of a case statement. The break statement is mandatory in C# and it avoids the fall through of one case statement to another.
Is it a good practice to practise handle the exceptions in code?
Briefly describe navigation controls. List the navigation controls that are present in ASP.NET 4.0?
Name the events which occur when the client requests the ASP.NET page from IIS server?
What is Class?
Which method is used to kill explicitly the users session?
List the difference between points, pixels, and em's at the time when fonts are displayed?
Describe the appSettings Section which contains in a web.config file?
Name the methods of DataView class?
Specify the advantages of the DOM?
Write main difference between classic ADO and ADO.NET?
18,76,764
1923560 Asked
3,689
Active Tutors
1457848
Questions Answered
Start Excelling in your courses, Ask an Expert and get answers for your homework and assignments!!