get distinct values from list of string c# using linq code example
Example 1: how to use distinct in linq query in c#
var distValues = objList.Select(o=>o.typeId).Distinct().ToList();
Example 2: c# get distinct values all fields from list
if (!IsPostBack) {
GridView1.DataSource = GetProducts()
.GroupBy(o => new { o.Make, o.Model })
.Select(o => o.FirstOrDefault());
GridView1.DataBind();
}