Пример #1
0
        //By James Palmisano
        //last edited 1/23/14
        //Purpose of app is to show inheritence.
        public Form1()
        {
            InitializeComponent();
            //make instance of rectangle class
            Rectangle rect = new Rectangle();
            rectangleInfo.Text = rect.ToString();
            areaOfRectangle.Text = "The area of the retangle is: "
                + Convert.ToString(rect.Area);

            //make instance of the circle class
            Circle cir = new Circle();
            circleInfo.Text = cir.ToString();
            circleArea.Text = "The area of the circle is: "
                + Convert.ToString(cir.Area);
        }