Linq Example 29 - Repeat

11:33 PM
Linq Query:

//Repeat
            var Repeated = Enumerable.Repeat(4, 3); //Repeats 4 three times
            foreach (var t in Repeated)
            {

                Console.WriteLine(t);

            }



Output:
4
4
4

0 comments:

Post a Comment