Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

linq distinct

var uniquePeople = from p in people
                   group p by new {p.ID} //or group by new {p.ID, p.Name, p.Whatever}
                   into mygroup
                   select mygroup.FirstOrDefault();
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #linq #distinct
ADD COMMENT
Topic
Name
6+6 =