Usar Valores de un enum como flags con FlagsAttribute
The other day, I was using the RegexOptions enum when creating a Regular Expression, and I thought it would be useful to dedicate a blog entry to using enumeration values as flags.
The following is a poor example, but it should be illustrative enough.
Imagine we have a Client class, and one of the Client properties is ClientState. The ClientState enum can be defined as follows: