METHOD

Enumerable.SkipWhile

Skips the initial consecutive matches. After the first failure, all remaining elements are returned without filtering them by that predicate.

Formal Syntax & Structure

csharp syntaxcsharp
items.SkipWhile(predicate)

Working Example

Example Snippetcsharp
using System;using System.Linq;Console.WriteLine(string.Join(",", new[] { 2, 4, 1, 6 }.SkipWhile(n => n % 2 == 0))); // 1,6
C# & .NET Reference