Queryable.Last() : Queryable « System.Linq « C# / C Sharp by API






Queryable.Last()

  
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.Last();
        Console.WriteLine(name);
    }
}

   
    
  








Related examples in the same category

1.Queryable.All
2.Queryable.Concat
3.Queryable.Contains
4.Queryable.Count()
5.Queryable.Distinct()
6.Queryable.Except
7.Queryable.First
8.Queryable.First(filter)
9.Queryable.FirstOrDefault
10.Queryable.Intersect
11.Queryable.LastOrDefault(filter)
12.Queryable.LongCount()
13.Queryable.LongCount(filter)
14.Queryable.Max
15.Queryable.Max(filter)
16.Queryable.Min()
17.Queryable.Min(filter)
18.Queryable.OfType
19.Queryable.OrderBy
20.Queryable.OrderByDescending
21.Queryable.Reverse
22.Queryable.SelectMany
23.Queryable.SequenceEqual
24.Queryable.Single
25.Queryable.SingleOrDefault
26.Queryable.Skip
27.Queryable.SkipWhile
28.Queryable.SkipWhile(filter)
29.Queryable.StartsWith
30.Queryable.Sum()
31.Queryable.Sum(projection)
32.Queryable.Take
33.Queryable.TakeWhile
34.Queryable.TakeWhile(filter)
35.Queryable.ThenBy
36.Queryable.ThenByDescending
37.Queryable.ToArray
38.Queryable.ToDictionary
39.Queryable.ToDictionary(filter)
40.Queryable.ToList()
41.Queryable.Union