public virtual void iAmPrinting(Ispitanie test) { if (test is Test) { Console.WriteLine($"Тип: Test. Вызываю ToString()...\n" + test.ToString()); } if (test is Examination) { Console.WriteLine($"Тип: Examination. Вызываю ToString()...\n" + test.ToString()); } if (test is Zachet) { Console.WriteLine($"Тип: FinalExamination. Вызываю ToString()...\n" + test.ToString()); } }
public void Delete(Ispitanie isp) { list.Remove(isp); Count--; }
public void Add(Ispitanie isp) { list.Add(isp); Count++; }