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.
How an ellipse is created, which is non- rectangular window?
State the characteristics of the reference-type variables which is supported in the C# programming language.
State some of technologies that are utilized within the AJAX?
What do you mean by Proxy and how to produce proxy for WCF Services?
Describe the role of the JIT compiler in .NET Framework?
Can I employ Windows Forms in the WPF application? Give reasons.
Explain the characteristics of the value-type variables which are supported in a C# programming language.
What do you mean by the term base class of .net?
State various implementations of the LINQ?
Explain the use of a CommandBuilder class?
18,76,764
1934123 Asked
3,689
Active Tutors
1420544
Questions Answered
Start Excelling in your courses, Ask an Expert and get answers for your homework and assignments!!