c# - How to remove duplicate records from datatable based on condition -
i have c# datatable following data
name marks month lmn 22 current xyz 55 previous abcd 100 previous abcd 50 current
i want remove duplicate names data if month column 'previous'.
example, here abcd having duplicate enteries want remove abcd having month 'previous'
so result datatable should like-
name marks month lmn 22 current xyz 55 previous abcd 50 current
the approach thinking follow deplicate rows , check 'previous' column value , delete it. seems long cut way. or datarow.delete
can suggest simpler way this?
Comments
Post a Comment