Home » C# Programming » Control Instructions

Which of the following statements is correct about the C#.NET code snippet given below? switch (id) { case 6: grp = "Grp B"; break; case 13: grp = "Grp D"; break; case 1: grp = "Grp A"; break; case ls > 20: grp = "Grp E"; break ; case Else: grp = "Grp F"; break; }

Correct Answer: Compiler will report an error in case ls > 20 as well as in case Else.

← Previous Question Next Question→

More Questions from Control Instructions

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion