assume that I have the following obejct:
class title
{
string Title;
int id;
// other information about title
}
class person
{
string Name;
List<title> titles;
// other information about person
}
List<Person> FindPersonsBasedOnTitle(List<Title> titles)
{
List<Person> p=getPersons();
// How to search P for all persons that have at least one title matched in titles?
}
How can I find the list of persons who have at least one title in input titles to this method?
Note that this won’t compile unless
titlesis public inperson.