Skip the first element in CSharp

Description

The following code shows how to skip the first element.

Example


/* w w  w.  jav  a2 s . c o m*/
using System;
using System.Linq;
using System.Collections;
using System.Collections.Generic;
public class MainClass {
    public static void Main() {
        string[] presidents = {"A", "Art", "Buch", "Bush", "Car", "land"};

        IEnumerable<string> items = presidents.Skip(1);

        foreach (string item in items)
            Console.WriteLine(item);
    }
}

The code above generates the following result.





















Home »
  C# Tutorial »
    LINQ »




Operator
Select
Where
OrderBy
Group
Join
Let
LINQ