Nested Enum and Property Naming Conflicts

后端 未结 7 822
孤城傲影
孤城傲影 2021-02-06 23:48

There are some related questions here and here, but they didn\'t really give me satisfactory answers. The problem is that enums nested in a class in C# cannot have the same name

7条回答
  •  死守一世寂寞
    2021-02-07 00:15

    I would move the enumerations outside the class definition and use the namespace to indicate that they relate to cards. I generally don't like enums nested inside classes. You're right about the plurality, though: singular for regular enums, plural for flags enums.

提交回复
热议问题