I have a list of Person types that have 3 properties Id, Name, Age
var per1 = new Person((1, "John", 33); var per2 = new Person((2, "Anna", 23); var persons = new List<Person>(); persons.Add(per1); persons.Add(per2);
using linq I want to select a person whose age is the same as my input, for example 33.
I know how to use any, but I donβt know how to choose an object that matches my condition.
panjo source share