Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi
I need linq query to delete the duplicate records from the datatable that contains specific words in that datacolumn. Kindly give me the solution for this problem.


In Datatable, i have the following rows

studentid studentname coursename
1 Abhi Course - I
1 Abhi Course - II



[Hint : I need to filter the duplicate records based on Coursename contains the word Course]


Expected Output:

studentid studentname coursename
1 Abhi Course - I
Posted
Comments
Sergey Alexandrovich Kryukov 25-Aug-14 12:22pm    
The question is: why do you allow some duplicate records in first place, when you add them? Maybe your efforts should be put to prevent adding duplicates instead.
—SA

1 solution

We do not do your homework: it is set for a reason. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action.

Try it yourself, you may find it is not as difficult as you think!
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900