The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 2,908 other followers

Archive for September 1st, 2015

Convert List/Enumerable of Enums to CSV – via Stack Overflow

Posted by jpluimers on 2015/09/01

I like simple solutions, thanks vcsjones for answering this:

Perhaps this:

var str = String.Join(", ", SupportedNotificationMethods.Select(s => s.ToString()));

You can read more about the String.Join method at MSDN. Older versions of String.Join don’t have an overload that takes an IEnumerable. In that case just call ToArray() after select.


via: c# – Convert List<Enum> to List – Stack Overflow.

Posted in .NET, .NET 3.0, .NET 3.5, .NET 4.0, .NET 4.5, C#, C# 3.0, C# 4.0, C# 5.0, C# 6 (Roslyn), Development, Software Development | Leave a Comment »

%d bloggers like this: