Skip to content
makolyte

makolyte

Solve real coding problems

  • About
  • C#
  • SQL

enum-hasflag

C# – How to use enum flags

01/26/202509/02/2020 by Mak

Enum flags allow you to put multiple values in an enum variable/parameter. This is a nice alternative to the problem of having to pass around a ton of bools . You set multiple values by bitwise ORing them together. Here’s an example: In this article, I’ll show how to create and use enum flags. Use … Read more

Categories C# Tags bitwise-or, enum, enum-hasflag, flags-attribute Leave a comment
About • Privacy Policy
© 2025 makolyte • Built with GeneratePress