C#: is it possible to make Enum member value assignment binary instead of decimal by default?

后端 未结 0 514
天涯浪人
天涯浪人 2020-12-07 03:51

By default, if no Enum value are assigned, they are automatically assigned by the compiler with a zero-based index:

[Flags]
public enum MyColors
{
    Yellow,         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题