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

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

javascript - jquery or ashx not working -

inno setup - TLabel or TNewStaticText - change .Font.Style on Focus like Cursor changes with .Cursor -