15
Answers

groupby in datatable

nishant ranjan

nishant ranjan

11y
5.2k
1
ds_update.ReadXml(strOutPath + @"\backup.xml");      //ds_update is dataset     


data contained is

eid     mid     path
112     500    xyz
112      501   abc
113     500    ddd
113     500    aaa
113   600      uuu

what i want is     result as 
mid
500        3
501         1
600        1
how can i use group by in datatable.select
DataRow[] results = ds_update.Tables[0].Select(?????????);
            foreach (DataRow dr in results)
            {
               
            }
i want each mid with no of times its occurrence
Answers (15)