C# Programming - Enumerations - Discussion
Discussion Forum : Enumerations - General Questions (Q.No. 11)
11.
Which of the following CANNOT be used as an underlying datatype for an enum in C#.NET?
Discussion:
2 comments Page 1 of 1.
Jitendra said:
1 decade ago
Each enum type has a corresponding integral type called the underlying type of the enum type. This underlying type can represent all the enumerator values defined in the enumeration. An enum declaration may explicitly declare an underlying type of byte, sbyte, short, ushort, int, uint, long or ulong. Note that char cannot be used as an underlying type.
Chakry said:
1 decade ago
Not only char but also float, double, decimal and even bool value types are not accepted by Enum. Because enumerations are user defined integer data types. This is the answer.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers