c# - Datatable.select get rows dulicate -


i have datatable this:

code    class       math       history b       math b       math 

i wanna rows have same code value class not same. expected:

a       math       history 

i had tried datatable.select , group , dont work! me.

simplest way of doing via linq should like:

datatable.distinct()          .groupby(x => x.code)          .where(gr => gr.count() > 1)          .selectmany(gr=> gr); 

Comments

Popular posts from this blog

hibernate - How to load global settings frequently used in application in Java -

python 3.x - Mapping specific letters onto a list of words -

objective c - Ownership modifiers with manual reference counting -