How to get Duplicates for Multiple Coloumns in a datatable


#1

How to get Duplicates from Multiple coloumns ,i Have expression to get duplicate for single coloumn ie (From p in dt.Select() where( From q in dt.Select() where q(“Coloumn Name”).Equals(p(“Coloumn Name”)) Select q).ToArray.Count>1 Select p).ToArray.CopyToDataTable(), but i want for multiple coloumns.i am getting Unique Values for multiple Coloumns by using this expression dt.AsEnumerable().GroupBy(Function(i) New With {Key.NAME = i.Field(Of String)(“NAME”),Key.ROLE = i.Field(Of String)(“ROLE”)}).Select(Function(g) g.First).CopyToDataTable().so please help me to get diplicates for multiple coloumns