What will be the correct statement of the following C# code?
enum color:byte
{
yellow = 500,
green = 1000,
pink = 1300
}
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: Option D

Join The Discussion