Example #1
0
        public int CompareTo(object obj)
        {
            Shape3D shape = obj as Shape3D;

            if (shape != null)
            {
                return(this.GetVolume().CompareTo(shape.GetVolume()));
            }
            else
            {
                throw new Exception("Can't compare object");
            }
        }
Example #2
0
 public void AddShape(Shape3D shape)
 {
     shapes.Add(shape);
 }