Easy way to concatenate list of strings into a comma-separated strings, where strings are members of an object?

object, string, string-concatenation, vb.net, visual-studio-2005

Solution

Try this:

String.Join(", ", tagList.Select(t => t.Description).ToArray());

Sorry, I just read again and saw you're using VS2005; so maybe best way is to create a `StringBuilder` and concatenate your `tag.Description`.

Problem

Say I have a List(Of Tag) with Tag being an object. One member of Tag, Tag.Description, is a string, and I want to make a comma-separated concatenation of the Description members. Is there an easier way to do this than to read the Description members into a List(Of String) and then use the Join function? Thanks!

Original source