public int CompareTo(object obj)
        {
            AbstractFigure figure = obj as AbstractFigure;

            if (GetArea() > figure.GetArea())
            {
                return(1);
            }
            else if (figure.GetArea() > GetArea())
            {
                return(-1);
            }
            else
            {
                return(0);
            }
        }
            public int Compare(object obj1, object obj2)
            {
                AbstractFigure figure1 = obj1 as AbstractFigure;
                AbstractFigure figure2 = obj2 as AbstractFigure;

                if (figure1.GetPerimetr() > figure2.GetPerimetr())
                {
                    return(1);
                }
                else if (figure2.GetPerimetr() > figure1.GetPerimetr())
                {
                    return(-1);
                }
                else
                {
                    return(0);
                }
            }