static void Main(string[] args) { Office o = new Office(); Person p1 = new Person("Alex"); Person p2 = new Person("John"); Person p3 = new Person("Kate"); Person p4 = new Person("Georgy"); Person p5 = new Person("Garry"); o.Add(p1); Console.WriteLine(); o.Add(p2); Console.WriteLine(); o.Add(p3); Console.WriteLine(); o.Add(p4); Console.WriteLine(); o.Add(p5); Console.WriteLine(); Console.WriteLine(); o.Remove(p3); Console.WriteLine(); o.Remove(p4); Console.WriteLine(); o.Remove(p1); Console.WriteLine(); o.Remove(p2); Console.WriteLine(); o.Remove(p5); Console.ReadLine(); }
static void Main(string[] args) { Person mary = new Person("Mary"); Person kate = new Person("Kate"); Person hugo = new Person("Hugo"); Person john = new Person("John"); Office office = new Office(); office.Add(mary); office.Add(kate); office.Add(hugo); office.Add(john); office.Leave(mary); office.Leave(kate); office.Leave(hugo); office.Leave(john); Console.ReadKey(); }
static void Main(string[] args) { Office office = new Office(); Person john = new Person("Джон"); office.Add(john); Person bill = new Person("Билл"); office.Add(bill); Person hugo = new Person("Хьюго"); office.Add(hugo); office.Remove(john); office.Remove(bill); office.Remove(hugo); Console.ReadKey(); }
static void Main(string[] args) { var person1 = new Person("Alex"); var person2 = new Person("Mary"); var person3 = new Person("Jhon"); var person4 = new Person("Kate"); var person5 = new Person("Simon"); var office = new Office(); office.Add(person1); office.Add(person2); office.Add(person3); office.Add(person4); office.Add(person5); office.Remove(person1); office.Remove(person5); office.Add(person5); Console.ReadKey(); }