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

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -