Abstract enum in c#
问题 Is there a way to make a ( protected ) enum abstract in C#? Example of base class: protected abstract enum commands{}; //CS0106 protected abstract void useCommands(commands meh); This does not compile, since " abstract is not valid for this item". Is there a working way to achive the desired behaviour? 回答1: All enums must derive from System.Enum All enums are value types and hence sealed. Because of above these two rules, you cannot inherit enums. 回答2: enum is a keyword , not a class name : /