Monday, 27 August 2012

.NET Select Distinct Values From DataTable

To select distinct values from a DataTable you can make use of the DataView:

DataView view = new DataView(dt);
DataTable distinct = view.ToTable(true, "columnname");

No comments:

Post a Comment