
Partitioning Operator - Take
The Take operator yields a given number of elements from a sequence and then skips the remainder of the sequence.
This example uses Take to generate a sequence of the first three elements of an integer array. It then iterates through the sequence to print the results.
| using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication4 var allButFirst4Numbers = numbers.Take(3); Console.WriteLine("First 3 Numbers"); Console.ReadLine(); |
Output:
Aspnet Discussion
- - Web application
- - Great Indian Developer Su
- - Aspx page inside Silverli
- - Open aspx page inside Sil
- - Guidance for a novice




