Using GetHashCode for getting Enum int value

后端 未结 7 1185
北海茫月
北海茫月 2020-12-03 07:20

I have an enum

public enum INFLOW_SEARCH_ON
{
  ON_ENTITY_HANDLE = 0,         
  ON_LABEL = 1,                 
  ON_NODE_HANDLE = 2            
} // enum I         


        
相关标签:
7条回答
  • 2020-12-03 07:51

    You should use (int) MyEnumVariable. All enums by default are inherited from int.

    0 讨论(0)
提交回复
热议问题