Repeat

suggest change

Enumerable.Repeat generates a sequence of a repeated value. In this example it generates “Hello” 4 times.

var repeats = Enumerable.Repeat("Hello", 4);

foreach (var item in repeats)
{
Console.WriteLine(item);
}

/* output:
Hello
Hello
Hello
Hello
*/

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents