Remove Duplicates with LinQ

Try this (similar to @Lucas.Pimenta’s answer but in VB.NET):

dataTable = dataTable.AsEnumerable()
	.GroupBy(Function(i) i.Field(Of String)("columnWithDuplic"))
	.Select(Function(g) g.First)
	.CopyToDataTable
10 Likes