How to delete slides from PowerPoint using c#?

c#, interop, powerpoint

Solution

Open PowerPoint stack and per normal COM and use

var powerPoint = new Microsoft.Office.Interop.PowerPoint.Application();
var presentation = powerPoint.Presentations.Open(fileName);

presentation.Slides[x].Delete();
presentation.Save();

Problem

I want to delete a particular slide from a PowerPoint presentation using C#. Can anyone help me out on this?

Original source