Introduction#
Generate a sequence containing a repeated value.
public static System.Collections.Generic.IEnumerable<TResult> Repeat<TResult> (TResult element, int count);
Where:
element
is the value to be repeatedcount
is the number of times to repeat the value
Example#
Repeat the number 2 five times:
Enumerable.Repeat(2, 5);