How to set space on Enum

后端 未结 14 1451
栀梦
栀梦 2020-11-29 08:00

I want to set the space on my enum. Here is my code sample:

public enum category
{
    goodBoy=1,
    BadBoy
}

I want to set



        
14条回答
  •  自闭症患者
    2020-11-29 08:26

    Since the original question was asking for adding a space within the enum value/name, I would say that the underscore character should be replaced with a space, not an empty string. However, the best solution is the one using annotations.

提交回复
热议问题