Curioustab
Aptitude
General Knowledge
Verbal Reasoning
Computer Science
Interview
Aptitude
General Knowledge
Verbal Reasoning
Computer Science
Interview
Home
»
C# Programming
»
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 }
byte values cannot be assigned to enum elements.
enum elements should always take successive values.
Since 500, 1000, 1500 exceed the valid range of byte compiler will report an error.
enum must always be of int type.
enum elements should be declared as private.
Show Answer
Correct Answer:
Since 500, 1000, 1500 exceed the valid range of byte compiler will report an error.
Next →
Discussion & Comments
No comments yet. Be the first to comment!
Name:
Comment:
Post Comment