Qus:    What is enum? What is the default data type of enum?
Nov 27, 2020 13:45 2 Answers Views: 705 FRAUSKY

 



 An enumeration (enum) is a set of named integer constants. An enumerated type is declared using the enum keyword. C# enumerations are value data type. In other words, enumeration contains its own values and cannot inherit or cannot pass inheritance.



The default type of the enumeration elements is int. By default, the first enumerator has the value 0, and the value of each successive enumerator is increased by 1.

Prev Next
Answers (2)
PARTH Nov 28, 2020 02:35
Answer:   An enumeration (enum) is a set of named integer constants. An enumerated type is declared using the enum keyword. C# enumerations are value data type. In other words, enumeration contains its own values and cannot inherit or cannot pass inheritance.

The default type of the enumeration elements is int. By default, the first enumerator has the value 0, and the value of each successive enumerator is increased by 1.

NAIDU Nov 28, 2020 09:53
Answer:   Enum is a value type. Enum is a collection of constants which means it is a collection of string constants which are representing collection of integer constants. Int is the default data type of enum.

Post Your Answer
Guest User

Not sure what course is right for you?

Choose the right course for you.
Get the help of our experts and find a course that best suits your needs.


Let`s Connect