Which of the following statements is correct about the C#.NET code snippet given below?
int a = 10;
int b = 20;
int c = 30;
enum color: byte
{
red = a,
green = b,
blue = c
}
A:
Variables cannot be assigned to enum elements.
B:
Variables can be assigned to any one of the enum elements.
C:
Variables can be assigned only to the first enum element.
D:
Values assigned to enum elements must always be successive values.
Discuss About this Question.