CKTIS / C#
Enumerable.Skip: practical reference
Enumerable.Skip: practical reference: The deferred operation skips the first count elements and then returns the remainder.
Version: .NET LINQ; verified on .NET 10.0.14
Syntax
source.Skip(/* overload-specific arguments */)The deferred operation skips the first count elements and then returns the remainder.
Use it for paging only with a stable order; otherwise pages can change.
For a deferred source, skipped elements may still be enumerated and perform work.
A negative count is treated as zero; a count beyond the source length yields an empty result.
The complete program actually uses Enumerable.Skip; its exact expected stdout is 3,4.
Examples
using System;
using System.Collections.Generic;
using System.Linq;
Console.WriteLine(string.Join(",", new[] { 1, 2, 3, 4 }.Skip(2)));
Result
3,4
The complete program actually uses `Enumerable.Skip`; its exact expected stdout is `3,4`.