Enum value as hidden in C#

后端 未结 9 865
暖寄归人
暖寄归人 2020-12-21 01:40

I have an enum and i want to \"hide\" one of its values (as i add it for future support). The code is written in C#.

public enum MyEnum
{
   ValueA = 0,

            


        
9条回答
  •  粉色の甜心
    2020-12-21 02:37

    You can't hide it, but you can add a comment that this value doesn't have any effect at this moment. Otherwise just remove it and add it if you add the support, this shouldn't break any other code dependent on it, as long as the original values don't change.

提交回复
热议问题