What troubles me is that. I cant figure it out. What i need to do is to search for a dude with name 'nazwisko' that is in list 'List'. If there is no such dude then i have to return null; The language is C#.
Any help appreciated.
Pracownik Search(string nazwisko)
{
foreach (Pracownik pracownik in List)
{
if (List.Contains(pracownik))
return pracownik;
else
return null;
}
}