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 the different ways in order to pass parameters to the server?
Briefly describe the function of a CheckState property of a CheckBox control?
Define the term DTD?
Write major difference between function and sub-procedure?
The controls are fully loaded in which event?
State the properties in C# and the advantages that are obtained by using them in programs.
Explain DataReader object?
14. What is difference between Tool Strip drop down button and toolstripsplit button?
In what way we can auto size the button to fit the text?
Write down the steps for executing a LINQ query.
18,76,764
1941468 Asked
3,689
Active Tutors
1429562
Questions Answered
Start Excelling in your courses, Ask an Expert and get answers for your homework and assignments!!