Can somebody help me to run this program using c#. This program is to calculate the frequency of the number, for example 12 appear 10x. Before this I try to sort all list
I would put them all into a list then use a group by clause to group them ie
List numbers = new List { 1, 2, 2, 3, 5, 6, 2, 1, 4, 4 };
foreach (var group in numbers.GroupBy(n => n))
{
Console.WriteLine("{0} was found {1} times", group.Key, group.Count());
}