From simple questions to complex issues, IDNLearn.com has the answers you need. Discover comprehensive answers to your questions from our community of knowledgeable experts.

What is wrong with this case statement -> case 2:
A. cases must be capitalized
B. cases must use a ; and not a :
C. nothing


Sagot :

Answer:

C: Nothing

Explanation:

Assuming this case is acting upon a switch on an integral value, there is nothing wrong with this case header.

var x = 10;

switch (x)

{

case 2:

     Console.WriteLine("The value of 'x' is 2!");

}