how to count Records programatically using c# List object

Mohammad Qasim 576 Reputation points
2020-08-24T12:51:09.7+00:00

Greetings,

i have data into list like below,i want to count progrmatically using c#

ID, User ID UserName, Documentname
1 5 A Test
2 5 A Testa
3 6 B Testb
4 7 C Testc1
5 7 C Testc
6 8 AB Testabd

Requirement
I want "count" document, based on user on desc order, so output would be like this

Name, Total Docs
A 2
B 1
C 2
AB 1

Microsoft 365 and Office SharePoint Server For business
{count} votes

5 additional answers

Sort by: Most helpful
  1. Mohammad Qasim 576 Reputation points
    2020-08-26T11:48:19.323+00:00

    Thanks ,works perfectly fine

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.