Exemplo n.º 1
0
        public void ImplicitConversion()
        {
            var square = new Square(7);

            Rectangle rectangle = square; //Implicit conversion from Square to Rectangle
            DrawRectangle(rectangle);
        }
Exemplo n.º 2
0
 private static void DrawSquare(Square square)
 {
     Console.WriteLine("square = {0}", square);
 }