When I generate comma separated lists, I hate how I have to chop off the trailing comma.
Is there a better way? I do this fairly often so looking for opinions.
for(int x = 0; x < list.Count; x++)
{
sb.Append(list[x].Name);
sb.Append(",");
}
var result = sb.toString().Substring(0, result.length - 2);