Want to know the best way to repeat a character in C#? Use the following example:
string tabs = new String('\t', n);
Where n is the number of times you want to repeat the string.
static string Tabs(int n)
return new String('\t', n);
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.