First operator : First « LINQ « C# / CSharp Tutorial






using System;
using System.Linq;
using System.Collections;
using System.Collections.Generic;

public class MainClass {
    public static void Main() {
        string[] presidents = {"G", "H", "a", "H", "over", "Jack"};
        string name = presidents.First();
        Console.WriteLine(name);

    }
}








22.43.First
22.43.1.Use First, Last with expression
22.43.2.First with string method
22.43.3.Retrieving all strings in an array whose length matches that of the shortest string
22.43.4.Use First to return the first matching element as a Product
22.43.5.First operator
22.43.6.Get the first element