I read this expression in a C # book.
Enumerations do not have to follow a sequential order and should not have unique values .
If I understand this statement, it means that one of them is acceptable (I don't know which one):
1.
enum EmpType
{
Manager = 1,
Grunt = 1,
Contractor = 100,
VicePresident = 9
}
2.
enum EmpType
{
Manager = 10,
Manager = 1,
Contractor = 100,
VicePresident = 9
}
Can someone explain to me? I thought C # should be a subset of C / C ++.
source
share