public void RemoveRef(Referee x) //usuwa sedziego { int i = 0; bool checkmark = false; foreach (Referee a in RefList) { if (x.getName() == a.getName() && x.getSurname() == a.getSurname()) { RefList.RemoveAt(i); Console.Clear(); Console.WriteLine("Usuniecie sedziego powiodlo sie."); Console.ReadKey(); checkmark = true; break; } i++; } if (checkmark == false) { Console.Clear(); Console.WriteLine("Usuniecie sedziego nie powiodlo sie."); Console.ReadKey(); } }
public override void ShowRef() { Console.WriteLine("Referee: {0} {1}", r.getName(), r.getSurname()); }