Singular or plural for enumerations?

后端 未结 7 1679
长发绾君心
长发绾君心 2021-01-31 12:56

Do you use singular or plural for enumerations? I think it makes best sense with plural in the declaration

enum Weekdays
{
    Monday,
    Tuesday,
    Wednesday         


        
7条回答
  •  旧巷少年郎
    2021-01-31 13:30

    Microsoft recommends using a singular name for enumerations unless it uses the Flags attribute. And as taken from the Framework Design Guidelines book you should not suffix enumeration type names with Enum, Flags, etc. and you should not prefix enumeration values with an abbreviation or acronym as was common with VB enumerations back in the day.

提交回复
热议问题