O'Reilly logo

From Java to C#: A Developer's Guide by Heng Ngee Mok

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

C.3. Naming C# enums

Use Pascal casing for both enum identifiers and enum value names. For example:

enum Day {Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday};

It is not recommended to add Enum after the enum identifier. In the case above, Day would be more appropriate than DayEnum.

Enum names should be singular – Day is preferable to Days (it is obvious that an enum type will represent multiple items).

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required