Пример #1
0
 static void Main(string[] args)
 {
     Rectangle r = new Rectangle(10, 7);
     double a = r.area();
     Console.WriteLine("Area: {0}", a);
     Console.ReadKey();
 }
Пример #2
0
 static void Main(string[] args)
 {
     Caller c = new Caller();
     Rectangle r = new Rectangle(10, 7);
     Triangle t = new Triangle(10, 5);
     c.CallArea(r);
     c.CallArea(t);
     Console.ReadKey();
 }