c# - Get distinct parameters from a List -
c# - Get distinct parameters from a List -
this question has reply here:
linq distinct() name populate dropdown list name , value 7 answers linq: distinct values 6 answers get distinct items list 3 answersi have cardata object next properties: primarykey make model year drivetrain country
i have 1000 of these cardata objects in list : list<cardata> carobjects
is there simple way list of distinct makes?
var makes = carobjects.select(car => car.make).distinct();
this transforms list list of cardata list of makes, , finds distinct values of new list.
c# list
Comments
Post a Comment