There is a DataTable table that contains information, for example:

 Title | Description | Number Заголовок 1 | Описание 1 | 1 Заголовок 2 | Описание 2 | 15 Заголовок 3 | Описание 3 | 15 Заголовок 4 | Описание 4 | 15 

I would like to convert it to mind:

  Number | Count 1 | 1 15 | 3 

How is this possible to do?

    1 answer 1

    If I'm not mistaken, you can like this

     var groupedData = from b in table.AsEnumerable() group b by b.Field<int>("Number") into g select new { Number= g.Key, Count = g.Count() }; 

    Feeddle

    • I tried, debbager shows that the calculation is not conducted and the number is always 0. - DisguisePerceptron
    • one
      @DisguisePerceptron added an example in fidle - Batanichek
    • There is an error somewhere in my code. I think I can fix it myself. Thanks for the help in the decision. - DisguisePerceptron