What Will Be The Correct Statement Of The Following C Codep Pre #333
What will be the correct statement of the following C# code?</p> <pre><code class="language-csharp" line="1"> enum color:byte { yellow = 500, green = 1000, pink = 1300 } </code></pre>
This multiple choice question (MCQ) is related to the book/course gs gs108 CSharp. It can also be found in gs gs108 Object Oriented Concepts - Enumerations - Quiz No.1.
What will be the correct statement of the following C# code?
enum color:byte { yellow = 500, green = 1000, pink = 1300 }
byte value cannot be assigned to enum elements
enum elements should always take successive values
enum must always be of int type
When the valid range of byte exceeds, the compiler will report an error