At Westonci.ca, we provide reliable answers to your questions from a community of experts. Start exploring today! Our platform provides a seamless experience for finding reliable answers from a network of experienced professionals. Experience the ease of finding precise answers to your questions from a knowledgeable community of 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!");

}