/// <summary> /// Main Task02 method. /// </summary> public static void Main() { Person john = new Person { Name = "John" }; Person paul = new Person { Name = "Paul" }; Person george = new Person { Name = "George" }; Person ringo = new Person { Name = "Ringo" }; DateTime morningTime = new DateTime(2017, 6, 27, 10, 0, 0); DateTime afternoonTime = new DateTime(2017, 6, 27, 13, 0, 0); DateTime eveningTime = new DateTime(2017, 6, 27, 17, 0, 0); MessageSenderEventArgs eventArgs = new MessageSenderEventArgs(morningTime); john.Arrived(eventArgs); paul.Arrived(eventArgs); eventArgs = new MessageSenderEventArgs(afternoonTime); george.Arrived(eventArgs); eventArgs = new MessageSenderEventArgs(eveningTime); ringo.Arrived(eventArgs); john.Left(); paul.Left(); george.Left(); ringo.Left(); Console.ReadKey(); }
static void Main(string[] args) { Person John = new Person("Джон"); Person Bill = new Person("Билл"); Person Hugo = new Person("Хьюго"); Person Jack = new Person("Джек"); Person.Came(John); Person.Came(Bill); Person.Came(Hugo); Person.Left(Bill); Person.Came(Jack); Person.Left(John); Person.Left(Hugo); Person.Left(Jack); Console.ReadKey(); }