Use of Break statement in switch statement
Explain the function of break statement in a switch statement with example?
Expert
Switch statement is the selection control statement which is used to handle several choices and move control to a case statements within its body.
Following code shows the example of the use of a switch statement in C#:
switch(choice)
{
case 1:
console.WriteLine("First");
break;
case 2:
console.WriteLine("Second");
default:
console.WriteLine("Wrong choice");
}
The break statement is used at the end of the case statement. Break statement is compulsory in C# and it avoids the fall through of one case statement to other.
Write the different types of literals used in C #?
State the concept of constructor?
Specify the tools which can be used to develop the .NET applications?
State the use of a .disco file?
Explain the purpose of the JIT compiler in .NET Framework?
In what way we can check/uncheck every item in a CheckedListBox control in the .NET 4.0 framework?
State various limitations of the AJAX.
How to ensure that no one has interfered with ViewState in the Web page?
Describe in brief regarding the performance of Visual basic?
Specify different ways of deployment which are supported by .NET Framework 4.0.
18,76,764
1938068 Asked
3,689
Active Tutors
1446016
Questions Answered
Start Excelling in your courses, Ask an Expert and get answers for your homework and assignments!!