using System;
using System.Linq;
public class Program
{
public static void Main()
int[] number = {1, 1, 2, 2, 3, 4};
var result = number
.GroupBy(x => x) // group your numbers
.Select(x => new {x.Key, Count = x.Count()}) // project
.GroupBy(x => x.Count) // group the count
.OrderByDescending(x => x.Key) // order by count
.FirstOrDefault(); // pick the highest group
foreach (var item in result)
Console.WriteLine(item);
}