コード例 #1
0
        static void Main(string[] args)
        {
            Circle c1 = new Circle();

            Console.WriteLine("The circle has radius of " + c1.getRadius() + " the area of " + c1.getArea() + " and it is " + c1.GetColor());
            Circle c2 = new Circle(2.0, "Blue");

            c2.SetRadius(3.2);
            Console.WriteLine("The circle has radius of " + c2.getRadius() + " and area of " + c2.getArea() + " and it is {0} ", c2.color = "yellow");
        }
コード例 #2
0
        static void Main(string[] args)
        {
            Circle c1 = new Circle();

            Console.WriteLine("The Circle has radius of " + c1.getRadius() + " and area of " + c1.getArea() + " and it is " + c1.GetColor());
            Circle c2 = new Circle(2.0, "Blue");

            Console.WriteLine("The Circle has radius of " + c2.getRadius() + " and area of " + c2.getArea() + " and it is " + c2.GetColor());
        }
コード例 #3
0
        static void Main(string[] args)
        {
            Circle c1 = new Circle();

            Console.WriteLine("The circle has radius" + c1.getRadius() + "has of" + c1.getArea());
            Circle c2 = new Circle(2);

            Console.WriteLine("The circle has radius" + c2.getRadius() + "has of" + c2.getArea());
            Circle c3 = new Circle(3.0, "Orange");

            Console.WriteLine("The circle has radium of {0} and color of {1}", c3.getRadius(), c3.GetColor());
            Console.WriteLine(c3.ToString());
        }