I have a list of enum values:
public static readonly List<NotifyBy> SupportedNotificationMethods = new List<NotifyBy> {
NotifyBy.Email, NotifyBy.HandHold };
I would like to output it as a comma separated list. (EG: “Email, Handhold”)
What is the cleanest way of doing this?
Perhaps this:
You can read more about the
String.Joinmethod at MSDN. Older versions ofString.Joindon’t have an overload that takes anIEnumerable. In that case just callToArray()after select.