.
Enums Data Type In C# Assignment Help
ENUMS
- It is an enumeration which is a set of named integer literals.
- It can be declared using the enum keyword.
- It is a value data type.
- It contains its own values and cannot used in inheritance.
Enums Data Type In C# Assignment Help By Online Tutoring and Guided Sessions from assignmenthippo.com
Declaring enum Variable
Syntax
enum enum_name
{
enumeration list
};
where,
- The enum_name specifies the identifier of an enumeration type
- Its list is a comma-separated one
- It holds an integer value, one greater than number precedes it.
- By default, the first enumeration symbol value is 0.
e.g.
enum WeekDays { Snday, Mnday, Tusday, Wednsday, Thrsday, Fiday, Satrday };
Example
![enums image 1 enums image 1](https://www.assignmenthelp.net/webimg/ahp/c-sharp-assignment-help/enums-image-1.jpg)
.