示例#1
0
        static void circleChoice()
        {
            double radius;

            Console.WriteLine("Enter circle radius in inches:");
            radius = double.Parse(Console.ReadLine());
            Circle circle = new Circle(radius);

            Console.WriteLine("Circle diameter: " + circle.GetDiameter());
            Console.WriteLine("Circle circumference: " + circle.GetCircumference());

            Console.WriteLine("1: Another shape, 2: Exit program");
            int exitChoice;

            exitChoice = int.Parse(Console.ReadLine());
            if (exitChoice == 1)
            {
                Main();
            }
            else if (exitChoice == 2)
            {
                return;
            }
        }