Uploaded November 2014 | Updated September 2026, 1 week ago
Even if you've defined enums in C# decorated with the [Flags] attribute, you'll find this deep dive extremely informative.
In this video I take you under the hood and explain what's really going on and how you can use bitwise operations for enums and treat them as "Sets" that contain multiple possible values and how to use bitwise operations to answer questions such as
1. Does the set contain "X" element
2. Add element "X" to an existing set
3. Remove element "X" from an existing set
We also explore the bitwise Left Shift operator and how we can use it while defining our enum elements and their values.
Even if you've defined enums in C# decorated with the [Flags] attribute, you'll find this deep dive extremely informative.
In this video I take you under the hood and explain what's really going on and how you can use bitwise operations for enums and treat them as "Sets" that contain multiple possible values and how to use bitwise operations to answer questions such as
1. Does the set contain "X" element
2. Add element "X" to an existing set
3. Remove element "X" from an existing set
We also explore the bitwise Left Shift operator and how we can use it while defining our enum elements and their values.










