I have a flagged enum and need to retrieve the names of all values set on it.
I am currently taking advantage of the enum\'s ToString() method which returns the eleme
Enum.Parse will handle the concatenated values outputted by ToString just fine. Proof using the Immediate window:
? System.Enum.Parse(typeof(System.AttributeTargets), "Class, Enum")
Class | Enum
(the second line is the output, which is different in the debugger/immediate window from the generic Enum.ToString() output).