StringExtensions.Repeat

Extension Method in StringExtensions

Declaration

public static string Repeat(this string str, int n)

Description

Repeats the string a given number of times.

Parameters

strThe string to repeat.
nThe number of times to repeat the string.

Returns

stringA new repeated string.