为了让枚举类型支持All=View|Add|Delete|Save操作,需要在枚举类型上用[Flags]进行标注:
[Flags]
public enum AccessRights
{
View=0x01,
Add=0x02,
Delete=0x04,
Save=0x08,
All=View|Add|Delete|Save
}
为了让枚举类型支持All=View|Add|Delete|Save操作,需要在枚举类型上用[Flags]进行标注:
[Flags]
public enum AccessRights
{
View=0x01,
Add=0x02,
Delete=0x04,
Save=0x08,
All=View|Add|Delete|Save
}
转载于:https://www.cnblogs.com/bjxingch/articles/6561236.html