Back to
Standard Query Operators.
EditIntroduction
The Repeat operator generates a sequence by repeating a value a given number of times.
EditMethod Signatures
public static IEnumerable<TResult> Repeat<TResult>(
TResult element,
int count)EditExceptions
Throws an ArgumentOutOfRangeException if
count < 0.
EditPseudo-code
If
count < 0 throw an ArgumentOutOfRangeException.
Loop
count times.
Return element. Resume execution from this point when the next element is requested.
EditLoop Count
This is a generation type operator, it does not loop through a given collection. It returns the
element as many times as requested as the user enumerates through the result.
EditCode Samples
TODO: Needs code sample