
Retrieving Unique Values from a DataTable in .NET
March 25, 2009The easiest way to return a new table that has only the unique values from the original table is as follows:
DataTable distinctTable = originalTable.DefaultView.ToTable(true, “FieldName”);
Thus “distinctTable” will contain unique values!!!
Have fun!

