Пример #1
0
        public static void Main()
        {
            Shape  sh  = new Shape(9);
            Shape  sh1 = new Shape(4, 3);
            String a;

            a = "ABC";
            Shape sha = new Shape();

            Console.WriteLine("Square: " + sha.GetArea(2));
            Console.WriteLine("Rectangle: " + sha.GetArea(2, 3));
            Console.WriteLine(sh.Area());
            Console.WriteLine(sh1.Area());
        }
Пример #2
0
 public static void PrintArea(Shape s)
 {
     Console.WriteLine(s.Area());
 }