Possible Duplicate:
Best way to repeat a character in C#
I'm making a big Comma separated CSV file. Most of the files fields are null and it would be provided later on, so I need to insert just a comma. I made a simple method:
private string MakeComma(int CommaNumber)
{
StringBuilder sb = new StringBuilder(string.Empty);
for (int i = 0; i < CommaNumber; i++)
{
sb.Append(",");
}
return sb.ToString();
}
I'm wondering if there is a better way using Linq, Join etc.