Fast Way To Repeat a String

January 17, 2014 at 5:46 PMadmin

there is may way to do it , but I this the following extension method will be that fast and efficient way to repeat a string for a specific number of times , just add this method to a static class and you can call it like :


" ".Repeat(10);

public static string Repeat(this string value, int count)


return new StringBuilder().Insert(0, value, count).ToString();



Posted in: .NET | IT