Vidyalelo
C# Programming · Q47

Classes and Objects in C Sharp

Programming · C# Programming · question 47

Q47

What will be the correct statement of the following C# code? enum color:byte yellow = 500, green = 1000, pink = 1300

A.
byte value cannot be assigned to enum elements
B.
enum elements should always take successive values
C.
enum must always be of int type
D.
When the valid range of byte exceeds, the compiler will report an error
Answer

Answer: Option D

Solution

Answer: Option D
No explanation is given for this question Let's Discuss on Board