Discussion :: Enumerations
-
Which of the following statements is correct about the C#.NET code snippet given below?
enum color : byte { red = 500, green = 1000, blue = 1500 }
A.
byte values cannot be assigned to enum elements. |
B.
enum elements should always take successive values. |
C.
Since 500, 1000, 1500 exceed the valid range of byte compiler will report an error. |
D.
enum must always be of int type. |
E.
enum elements should be declared as private. |
Answer : Option C
Explanation :
No answer description available for this question.
Be The First To Comment