Example:
using System;
using System.Linq;
using System.Collections.Generic;
class LinqFirstWithConditionExample
{
static void Main(string[] args)
{
int[] nums = { 50,51,52,53,54,72,63,110};
var result = (from n in nums
select n).First(n => n == 110);
Console.WriteLine(“The first element of sequence: ” + result);
Console.ReadLine();
}
}
Output:
The first element of sequence: 110