Find használata

This commit is contained in:
Kovács Rudolf
2026-10-14 14:23:01 +02:00
parent 76fba9ef9f
commit 5b0df47f78

View File

@@ -38,6 +38,17 @@
Tanulo tanulo = tanulok.Find(x=>x.Vezeteknev==inVezeteknev && x.Keresztnev==inKeresztnev);
if (tanulo!=null)
{
Console.WriteLine($"{tanulo.Vezeteknev} {tanulo.Keresztnev}");
} else
{
Console.WriteLine("Nincs ilyen tanuló!");
}
}