0
鑑於以下枚舉:位運算枚舉
enum MyEnum
{
ValueOne = 1,
ValueEmpty,
ValueTwo = 2,
ValueThree = 2,
ValueFour = ValueOne | ValueEmpty,
ValueFive = ValueTwo | ValueThree
}
什麼都在ValueFour和ValueFive元素所涉及的業務,因爲這些都是值我得到?
//Is assigned 3
var valueOne = (int) MyEnum.ValueFour;
//Is assigned 2
var valueTwo = (int)MyEnum.ValueFive;
由於