static void Main(string[] args)
        {
            Square s = new Square {
                Side = 10
            };
            SquareToRectangleAdapter adapter = new SquareToRectangleAdapter(s);

            Console.WriteLine(adapter.Area());
        }
Exemple #2
0
        static void Main(string[] args)
        {
            var square = new Square();

            square.Side = 5;

            var objAdapter = new SquareToRectangleAdapter(square);

            WriteLine(objAdapter);
            ReadLine();
        }