예제 #1
0
        public void ImplicitConversion()
        {
            var square = new Square(7);

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