1
我擁有財產性指定int值自定義枚舉屬性
public Enums.CustomEnumProp MyEnum { get; set; }
它的類型是CustomEnumProp
public enum CustomEnumProp { A = 1, B = 2, C = 3}
的,我需要使用傳遞int值作爲用戶的選擇,並將其分配給MyEnum
財產。
forexampe:用戶是從combobox中選擇2,然後將此int分配給MyEnum。
感謝
將你的眼睛移到右邊的「相關」欄。 – zerkms
請在提出新問題之前使用搜索,因爲您可以在右側看到第一個結果就是您的答案[在int中枚舉int枚舉](http://stackoverflow.com/questions/29482/cast-int -to-枚舉在-C-尖銳) – Prix