Reputation: 7438
I am getting the following compilation error when trying to create an Enum:
"A get or set accessor expected"
This is the code:
private Enum HolidayCalendarType
{
BusinessDays,
CalendarDays,
}
What is the issue?
Upvotes: 2
Views: 3277
Reputation: 7438
The keyword enum
should be in lower case when defining it. The following declaration works:
private enum HolidayCalendarType
{
BusinessDays,
CalendarDays
}
Whereas Enum
(Pascal case) helps to provide the base class for enumerations.
Upvotes: 10