Answers for "get distinct data from list in c#"

C#
1

c# distinct array of objects by values

var uniquePersons = persons.GroupBy(p => p.Email)
                           .Select(grp => grp.First())
                           .ToArray();
Posted by: Guest on April-06-2020
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

Code answers related to "get distinct data from list in c#"

C# Answers by Framework

Browse Popular Code Answers by Language