Hi Guys,
I'm trying to get distinct rowsfrom a datatable using LINQ.
This does the job. I'm not sure how to loop through the categories array now to get the ID and Name values. Please advise meCode:Dim categories = dt.AsEnumerable().[Select](Function(row) New With { _ Key .Id = row.Field(Of UInt32)("ID"), _ Key .Name = row.Field(Of String)("name") _ }).Distinct().ToArray




Reply With Quote