I have the following list:
- alpha
- beta
- charlie
- delta
I want to turn these strings into one string, co开发者_如何学Cmma separated, but I want to add a character to them first (the @ symbol). The end result should be: @alpha,@beta,@charlie,@delta
What I have right now is a non-LINQ method, but it doesn't seem "clean":
String.Concat("@", String.Join(",@", mylist));
string.Join(",", mylist.Select(s => "@" + s));
精彩评论