Okay, so let’s say I have a List<car>. Each car also contains a List<part>. Each part has an ID associated with it. I’m only given the ID to a part, and I want to find the car that contains that part. What is the best way to find this car?
Okay, so let’s say I have a List<car> . Each car also contains a
Share
How about with LINQ?
In English: “Find the first car (or null if no such car exists) that has any part with an Id matching the desired Id.”