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 answers

i 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

Popular posts from this blog

web services - java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer -

Accessing MATLAB's unicode strings from C -

javascript - mongodb won't find my schema method in nested container -