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.
Explain the term Cloud Computing?
Explain the use of the PlaceHolder control? Is it possible to see it at runtime?
How a color is picked from the ColorDialog box?
What is the EventLog class?
List out the difference between the “dynamic” and “var” data types?
Write the difference between System.StringBuilder and System.String classes?
Explain the use of <sessionState> tag in a web.config file?
Describe the function of a SizeMode property of a PictureBox control?
Write the difference between for loop and the while in C#.
Explain MaskedTextBox control? And also explain the function of Mask property?
18,76,764
1932804 Asked
3,689
Active Tutors
1460200
Questions Answered
Start Excelling in your courses, Ask an Expert and get answers for your homework and assignments!!