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.
State some of technologies that are utilized within the AJAX?
Explain the use of <sessionState> tag in a web.config file?
In what way we can disable a context menu for the TextBox control?
Write the syntax to declare the namespace in the .NET and in VB?
Illustrate the term event bubbling?
Specify the way to suppress the final procedure inside the garbage collector forcibly in .NET?
What are the rules and regulations which should be followed while creating the well-formed XML document?
Write the importance of the Button control?
Name the methods of DataView class?
Explain the following methods DataAdapter.Update() and DataSetAcceptChanges()?
18,76,764
1951737 Asked
3,689
Active Tutors
1457128
Questions Answered
Start Excelling in your courses, Ask an Expert and get answers for your homework and assignments!!