Possible Duplicate:
Most efficent way of joining strings
I have a List. What would be the best possible way to create a single sting having all the strings in List but separated by ‘,’.
Thanks in advance
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Probably:
If you aren’t using .NET Framework 4, the overload for
IEnumerableis missing so you need to convert it to an array first:You can read more about
string.Joinat MSDN.