linq Repeat
This sample uses Repeat to generate a sequence that contains the number 8 ten times.
public static void Repeat()
{
var numbers = Enumerable.Repeat(8, 10);
int i = 1;
foreach (var n in numbers)
{
Console.WriteLine("Count {0} : {1}", i, n);
i++;
}
}
Output