I have a list called listitems that contains information about items.
I want to separate each list item with a comma and put it in a string called gh
But when I use the following, I get output like:
",a,b" which is incorrect
but I want the result to be like "a,b" .
How can I change the code?
foreach(var a in listitems) { gh = gh +"," + a; }
source share