Ejemplo n.º 1
0
        public static void Main(string[] args)
        {
            var bogdan = new Man(21, "Bogdan", false);

            Console.WriteLine($"Name: {bogdan._name}, Age: {bogdan._age}");
            bogdan.Walk();
            bogdan.WorkHard();
            bogdan.Pee();

            var masha = new Woman();

            Console1.Writeline($"Masha Name: {masha._name}, Age: {masha._age}");

            var max = HumanExtentions.DoSex(bogdan, masha);

            Console.WriteLine($"Max Name: {max._name}, Age: {max._age}");

            Console.ReadLine();
        }
Ejemplo n.º 2
0
 public static Man DoSex(Man man, Woman woman)
 {
     Console.WriteLine("9 month later");
     return(new Man(0, "Maximka", false));
 }