Answers for "how to get unique list in c#"

C#
1

how to get unique list in c#

using(var dataModel = new DataModel())
{
  var classes = dataModel.Attributes.Where(a => a.Field == "Class").Select(a => a.Key).Distinct().ToList();
}
Posted by: Guest on January-07-2021
0

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();
}
Posted by: Guest on November-25-2020

Code answers related to "how to get unique list in c#"

C# Answers by Framework

Browse Popular Code Answers by Language