I have a list of ints called MyList. In javascript, when we call toString on an array of numbers, it converts it into a string with each number separated with commas; I'm looking to do the same with in C#.
I tried calling .ToString() to the list but it's returning the type of the list. I'm thinking of a loop that iterates over the list and add each element to a stringbuilder, along with the comma, and then .ToString() the stringbuilder.
Is that the best way to do it?
Thanks.