Get distinct value from array of rows

Hi, I have an array of datarows, how to make sure one of the column only has distinct values?

you have two choice:

  1. if you just want retrieve distinct rows. convret array of data rows to data table and use:

DataView view = new DataView(table);
DataTable distinctValues = view.ToTable(true, “Column1”, “Column2” …)

1 Like