DataTable: how to get the duplicates and the row number of the duplicates

Viewed 1425

I have the following DataTable:

Article  Price
ART1        99
ART2       100   
ART3       150 
ART2        90
ART1        50

Now, I should create a new datatable with the position of the duplicates like that

Article  Duplicates
ART1            1,5
ART2            2,4        
ART3          
ART2            2,4
ART1            1,5

So the key is the "article" column

I found around only examples about finding which are the duplicate values and how many times are repeated the values with linq.

How can I achieve something like that with linq?

thank you

2 Answers
Related