This is example in the purest, basic, sugar-less form
public string GetDelimited(int numberOfLoops, string delimiter)
{
var builder = new StringBuilder();
for (int i= 1; i < numberOfLoops + 1; i++)
{
if (i > 1) builder.Append(delimiter);
builder.Append(i.ToString());
}
return builder.ToString();
}
0
solved How do I build a function in C# that returns a delimited set of string numbers? [closed]