Enum.Format (or <enum>.ToString()) has an optional format parameter that allows you to specify different formatting options. For “G” or “F”, with a bit-flag enum, it outputs “a delimiter-separated list of the names of those constants”.
At least on my system, I get a comma-space-delimited list. What I’d like to know is if you can change that delimiter through either the format string or via some other method I haven’t come across. (Specifically, I’d like a pipe-delimited list.)
Of course, I can always just do a string-replace on the output, but if there’s an option to change the delimiter beforehand, all the better.
I don’t think so, according to http://msdn.microsoft.com/en-us/library/c3s1ez6e.aspx they will be comma separated. You will have to perform a replace on the commas post conversion. You could do something like this: