Group by Email Address of Data table in C# using LINQ -


i having 2 columns (email-id first column has duplicate values) , more 1 row in data-table. need group rows according email-id , write new result data table.

current result:

mailid name v@v.in venil v@v.in neithal  a@a.in iniyan a@a.in kavin b@b.in oviya b@b.in thamizh 

expected result:

mailid name v@v.in venil, neithal a@a.in iniyan, kavin b@b.in oviya, thamizh 

kindly provide me linq code achieve above result. in advance.

from email in emailtable group email email.id grp order grp.key select new { email = g.key, names = /*your code here names in comma separated or however*/ } 

Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -

php - Accessing static methods using newly created $obj or using class Name -