
Partitioning Operator - SkipWhile
The SkipWhile operator skips elements from a sequence while a test is true and then yields the remainder of the sequence.
The example uses SkipWhile to create the sequence from the array. The boolean expression in the SkipWhile performs the test using the modulus operator.
| using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication4 var allButFirst3Numbers = numbers.SkipWhile(n => n % 3 != 0); Console.WriteLine("All elements starting from first element divisible by 3:"); Console.ReadLine(); |
Output:
Aspnet Discussion
- - Web application
- - Great Indian Developer Su
- - Aspx page inside Silverli
- - Open aspx page inside Sil
- - Guidance for a novice




