コード例 #1
0
    // Main Method
    public static void Main()
    {
        //Instantiate some rectangles
        Rectangle rect1 = new Rectangle(76, 100);

        Console.WriteLine("Area of the retangle = {0}", rect1.Area());
        Console.WriteLine("The longest side of the retangle = {0} and the shortest = {1}",
                          rect1.getTheLongestSide(), rect1.getTheShortestSide());
        rect1.checkIfSquare();

        Instantiate some pentagones
        Pentagone pent1 = new Pentagone(334);

        Console.WriteLine("Area of the pentagone = {0}", pent1.AreaNSides());
    }