title: Extension method to convert Flags to IEnumerable<Enum> and conversely (C#)
body: <p>I spent a couple hours trying to figure out a generic way of converting an Enum mask to an array of Enum values and, conversely, an array of Enum values to its Enum mask.</p>
  
  <p>Writing an extension method to do so was a bit of a pain so I just wanted to share my solution in case it could help someone. I'm sure it could be improved but, here it is!</p>