Link to home
Start Free TrialLog in
Avatar of curiouswebster
curiouswebsterFlag for United States of America

asked on

What's the LINQ to ensure two lists match?

have a list of string value, which ar Id's

List<string> myListOfIds

I also have an object with an Id, is a list

List<MyObject> myObjectsList

I need to extract a list of all MyObject objects with Id's found in myListOfIds

Thanks.
ASKER CERTIFIED SOLUTION
Avatar of Kyle Abrahams, PMP
Kyle Abrahams, PMP
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Depends on what you mean by "match". Two lists will only match, by default, if their corresponding references match. If you need to check on a particular property, then you might need to involve some lamdas at some point.

Can you clarify your matching criteria?
Never mind. I didn't read the question properly  : \

I think ged325 has you sorted out  = )
Avatar of curiouswebster

ASKER

Thanks!