static void Main(string[] args) { try { SuperList <string> sll = new SuperList <string>(); sll.Add("abc"); sll.Add("cсссссcc"); sll = sll + "hi"; foreach (string st in sll) { Console.WriteLine(st); } Console.WriteLine("Элемент,равный заданному "); Console.WriteLine(sll.First(p => p.Equals("abc"))); Doctor dr = new Doctor(); Patient pat = new Patient(); dr.say_heal += pat.Heal; dr.CommandHeal(); } catch (IndexOutOfRangeException e) { Console.WriteLine(e.Message); } Console.ReadKey(); }
public void BosListeyeEklenenOgelerDogruSiradadir() { SuperList <int> sayilar = new SuperList <int>(); sayilar.Ekle(3); sayilar.Ekle(5); var ilkOge = sayilar.First(); var ikinciOge = sayilar.Skip(1).First(); Assert.Equal(3, ilkOge); Assert.Equal(5, ikinciOge); }