Csharp / C# Linq First example

Example:

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

class LinqFirstExample { static void Main(string[] args) {

int[] nums = { 50,51,52,53,54,72,63,110};

var result = (from n in nums where n > 51 select n).First();

Console.WriteLine(“The first element of sequence: ” + result);

Console.ReadLine();

} }

Output: The first element of [...]