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.
Write down the classes which derive from the abstract System.Windows.Shapes.Shape class in the WPF?
Explain the use of the PlaceHolder control? Is it possible to see it at runtime?
When.NET was developed?
By what way we can recognize that the page is PostBack?
Briefly describe contra-variance and covariance in .NET Framework 4.0 and give an example for both?
Write down the LINQ query expressions?
Write the syntax of the for loop in C# code?
Explain the use of Role-based security?
Is it a good practice to practise handle the exceptions in code?
Explain, what is Connection Pooling?
18,76,764
1933121 Asked
3,689
Active Tutors
1453717
Questions Answered
Start Excelling in your courses, Ask an Expert and get answers for your homework and assignments!!