Hi,
Can anyone please provide me solution by LINQ query
ColumnA Column B
1234 55 ----- need to process
1234 55 --duplicate(not needed)
1234 55 --duplicate(not needed)
2222 55 ----- need to process
2222 66 ----- need to process
2222 66 -duplicate(not needed)
3333 77 ----- need to process
I want to print first row from duplicates only and unique values by comparing both the columns using LINQ query. Please help me on this.
If I take any of the single column name in the query it is missing some unique values again. I have edited my post in detail. Can you please check once and help me on this please @Gokul001
Build a datatable with same format and data → name as dtData
dtResults = dtData.Clone
dtResults = (From dte In dtTable.AsEnumerable
Group dte By col1=dte(0).ToString.Trim, col2=dte(1).ToString.Trim Into Group
Select dtResults.Rows.Add({col1,col2})).CopyToDataTable