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.
Briefly describe garbage collection? Differentiate between garbage collections in .NET 4.0 and previous versions?
Why Windows Installer is used?
Specify the pre-requisites for connection pooling?
Describe in brief regarding the Visual basic.NET?
Differentiate between Web server controls and HTML?
Can I employ Windows Forms in the WPF application? Give reasons.
How can height of a combo box drop-down list can be adjusted?
Is it possible for users to define their own exceptions in code?
Explain what is C#?
Write down the core of WPF assemblies?
18,76,764
1938484 Asked
3,689
Active Tutors
1427884
Questions Answered
Start Excelling in your courses, Ask an Expert and get answers for your homework and assignments!!