I have a DataTable with a Name column. I want to generate a collection of the unique names ordered alphabetically. The following query ignores the
DataTable
Name
You can use something like that:
dataTable.Rows.Cast<DataRow>().GroupBy(g => g["Name"]).Select(s => s.First()).OrderBy(o => o["Name"]);