Find használata

This commit is contained in:
Kovács Rudolf committed 2026-10-14 14:23:01 +02:00
1 parent 76fba9ef9f
commit 5b0df47f78
1 file changed
+11
+11
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ó!");
}
}