Uploaded November 2014 | Updated November 2026, 4 days 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. More articles and Programming With Intent chapters: matlus.com
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. More articles and Programming With Intent chapters: matlus.com










