Enumerable.ElementAtOrDefault : Enumerable « System.Linq « C# / C Sharp by API






Enumerable.ElementAtOrDefault

 

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

public class MainClass{
   public static void Main(){
            int[] numbers = {1, 2, 3, 4, 5, 6, 7, 8, 9};
            var query = numbers.ElementAtOrDefault(9);
            Console.Write(query);
   }
}

   
  








Related examples in the same category

1.Enumerable.Aggregate
2.Enumerable.Average()
3.Enumerable.Cast
4.Enumerable.Count()
5.Enumerable.DefaultIfEmpty
6.Enumerable.Distinct()
7.Enumerable.ElementAt
8.Enumerable.ElementsAfterSelf
9.Enumerable.Empty
10.Enumerable.First
11.Enumerable.OrderBy
12.Enumerable.Range
13.Enumerable.Repeat
14.Enumerable.Where