How do I declare a nested enum?

后端 未结 12 945
借酒劲吻你
借酒劲吻你 2020-12-08 18:29

I want to declare a nested enum like:

\\\\pseudocode
public enum Animal
{
  dog = 0,
  cat = 1
}

private enum dog
{
   bulldog = 0,
   greyhound = 1,
   hus         


        
12条回答
  •  萌比男神i
    2020-12-08 19:24

    Simply, no, it cannot.

    I recommend that you define all of the values within the Animal enum. Is there any reason why you want this particular structure?

提交回复
热议问题