title: Delete All Shapes of a PowerPoint Slide
body: <p>I tried to delete all shapes with the following piece of codes:</p>
  
  <pre>
  
  PowerPoint.Application ppApp = Globals.ThisAddIn.Application;
  PowerPoint.Presentation ppP = ppApp.ActivePresentation;
  PowerPoint.Slide ppS = ppApp.ActiveWindow.Selection.SlideRange[1];
  PowerPoint.Shapes shapes = ppS.Shapes;
  
  foreach (PowerPoint.Shape shape in shapes)
  {
        shape.Delete(shape);                    
  }
  
  </pre>
  
  <p>It cannot delete all shapes as I expected, because when a shape is deleted, it will affect the PowerPoint.Shapes. If I want to delete all shapes, I need to add all shapes into a List, and then delete each one like:</p>
  
  <pre>
  
  PowerPoint.Application ppApp = Globals.ThisAddIn.Application;
  PowerPoint.Presentation ppP = ppApp.ActivePresentation;
  PowerPoint.Slide ppS = ppApp.ActiveWindow.Selection.SlideRange[1];
  PowerPoint.Shapes shapes = ppS.Shapes;
  if (shapes == null) return;
  
  List listShapes = new List();
  foreach (PowerPoint.Shape shape in shapes)
  {
        listShapes.Add(shape);                    
  }
  
  foreach (PowerPoint.Shape shape in listShapes)
  {
        shape.Delete();
  }
  
  </pre>
  
  <p>Is there any other ways to delete faster?</p>