标签: c# enums
我有一个类似下面的枚举:
public enum ActionRole : int { Donor = 2501401, Recipient = 2501402, Wildcard = 2501403 } var temp = (ActionRole)1;
此行无法给出错误。我不明白为什么。因为ActionRole Enum没有值1,怎么能1施放ActionRole Enum?你能帮我解释一下吗?