TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
rahul ahuja
NA
80
35.8k
C# List
Jun 12 2014 11:10 AM
I have C# list of class WeekReport. I want to group by the list data by it two property
class WeekReport
{
public int ID {get;set;}
public int Count {get;set;}
public string Client {get;set;}
public string MessageType {get;set;}
}
List wkReportList<WeekReport> = new List<WeekReport>();
So I want to group by the list data by the "Client" and "MessageType"
ex
Normal data looks like below
ID Count Client MessageType
01 101 MegaTech Missing SO
02 150 MegaTech Not shipped
03 199 NIXIMIXI No PDF
04 109 MegaTech Missing SO
05 100 NIXIMIXI Not shipped
06 107 MegaTech No PDF
07 109 NIXIMIXI Other
08 100 MegaTech Other
09 107 MegaTech No PDF
10 110 NIXIMIXI Missing SO
11 130 MegaTech Not shipped
12 100 NIXIMIXI No PDF
13 110 MegaTech Missing SO
14 130 NIXIMIXI Not shipped
15 100 NIXIMIXI No PDF
16 110 MegaTech Other
17 130 NIXIMIXI Other
18 100 NIXIMIXI Other
So it is group by the client name and message type
ID Count Client MessageType
01 101 MegaTech Missing SO
02 150 MegaTech Missing SO
03 199 MegaTech No PDF
04 109 MegaTech No PDF
05 100 MegaTech No PDF
06 107 MegaTech Not shipped
07 109 MegaTech Not shipped
08 100 MegaTech Other
09 107 MegaTech Other
10 110 NIXIMIXI Missing SO
11 130 NIXIMIXI Missing SO
12 100 NIXIMIXI No PDF
13 110 NIXIMIXI No PDF
14 130 NIXIMIXI Not shipped
15 100 NIXIMIXI Not shipped
16 110 NIXIMIXI Other
17 130 NIXIMIXI Other
18 100 NIXIMIXI Other
Reply
Answers (
3
)
How to catch primerkey error programetically
swapping array element in console application