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 name of the methods available in .NET 4.0, which are used to add and delete items from the ListBox control?
Explain complete lifecycle of Web page?
What we can do to allot page specific attributes in the ASP.NET application?
Name the methods of DataView class?
Briefly describe about standard query operators in LINQ?
Why is XML InfoSet specification distinct from the Xml DOM? Explain what does the InfoSet attempt to resolve?
State the major difference between the sub-procedure and function?
Explain the XmlWriter class.
Write the difference between unmanaged and managed code?
List the difference between points, pixels, and em's at the time when fonts are displayed?
18,76,764
1927944 Asked
3,689
Active Tutors
1441472
Questions Answered
Start Excelling in your courses, Ask an Expert and get answers for your homework and assignments!!