Example #1
0
        public static void PrintAllBuffer(IBufferReadOnlyShape <AbstractShape> _ibuffer)
        {
            foreach (var item in _ibuffer)
            {
                String typeClass = item.GetType().ToString().Remove(0, 16);
                String paramName = typeClass.Equals("Circle") ? "radius-" : typeClass.Equals("Square")?"side-":"parameter-";

                Console.WriteLine($"{typeClass} : with {paramName } {item._param} , area -  {item._area } , circumference - {item._circumference}");
            }
        }
Example #2
0
 public static AbstractShape DeleteBuffer(IBufferReadOnlyShape <AbstractShape> _buffer)
 {
     return(_buffer.delete());
 }