LINQ C# Book

Input: IEnumerable
Optional lambda expression: TSource => bool
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
class Program
{
static void Main()
{
int[] numbers = { 1, 2, 3, 4, 5 };
int first = numbers.First();
int firstEven = numbers.First(n => n % 2 == 0);
Console.WriteLine(first);
Console.WriteLine(firstEven);
}
}
The output:
1
2