How to give enum values that are having space

前端 未结 5 2028
走了就别回头了
走了就别回头了 2021-01-23 22:39

i have to create an enum that contains values that are having spaces

public enum MyEnum
        {
            My cart,
            Selected items,
            Bi         


        
5条回答
  •  滥情空心
    2021-01-23 23:23

    As per the C# specification, "An enumerator may not contain white space in its name." (see http://msdn.microsoft.com/en-us/library/sbbt4032.aspx) Why do you need this?

提交回复
热议问题