Welcome to Westonci.ca, where you can find answers to all your questions from a community of experienced professionals. Get detailed answers to your questions from a community of experts dedicated to providing accurate information. Get detailed and accurate answers to your questions from a dedicated community of experts on our Q&A platform.

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!");

}