How do i remove duplicate rows in data table using C# Linq

  • Thread starter Thread starter Gani tpt
  • Start date Start date
G

Gani tpt

Guest
I have below data table and it contains many duplicate's over there.

I just want to compare the two columns in data table, if any duplicate records found then we should delete that rows and maintain original same in the data table..

How do i remove or delete using C# Linq (the unique column is MaterialNo and Name)

sample data below

MaterialNo Name Quantity Company

EA1011 Saritan 10000 SAN Pharma

EA2012 Anacin 20000 Rey Pharma

AB2020 Merin 20200 Cue Pharma

NoCode Savin 20000 SAX Pharma

NoCode Savin 20000 SAX Pharma

NoCode Metacin 10500 Med Pharma

NoCode Metacin 10500 Med Pharma

Note : Unique column is MateiralNo and Name and data maintain in same data table.

Continue reading...
 
Back
Top