Is there a built-in function to repeat a string or char in .NET?
string.Join("", Enumerable.Repeat("ab", 2));
Returns
"abab"
And
string.Join("", Enumerable.Repeat('a', 2))
Returns
"aa"
string.Concat(Enumerable.Repeat("ab", 2));
returns
"abab"