Here is a shorthand way for converting a list of strings defined as follows:
List<string> strings = new List<string>{ <span class="str">"a"</span>,<span class="str">"b"</span>,<span class="str">"c"</span> };</pre>
To something that looks like:
“a:b:c:”
Here is the trick using the foreach syntax:
var stringBuilder = new StringBuilder(); strings.ForEach(a=>stringBuilder.AppendFormat("{0}:",a));