3
で動作しない
enum WeekDays
{
Monday = 0,
Tuesday = 1,
Wednesday = 2,
Thursday = 3,
Friday = 4,
Saturday = 5,
Sunday = 6
}
private void button4_Click(object sender, EventArgs e)
{
WeekDays days0 = WeekDays.Monday | WeekDays.Tuesday | WeekDays.Wednesday;
WeekDays days1 = WeekDays.Monday | WeekDays.Tuesday | WeekDays.Wednesday | WeekDays.Thursday;
WeekDays days2 = WeekDays.Monday | WeekDays.Tuesday | WeekDays.Wednesday | WeekDays.Thursday | WeekDays.Friday;
}
出力は次のとおりです。がどのようにビット単位の演算子を列挙
days0 = Thursday,
days1 = Thursday,
days2 = 7
誰もが、これはどのように動作するかのロジックを説明できますか?