public void DeleteShapeFile(string shapeFilePath)
{
string fcName = System.IO.Path.GetFileName(shapeFilePath);
string folderName = System.IO.Path.GetDirectoryName(shapeFilePath);
using (ComReleaser oComReleaser = new ComReleaser())
{
IWorkspaceFactory workspaceFactory = new ShapefileWorkspaceFactory();
IWorkspace workspace = workspaceFactory.OpenFromFile(folderName, 0);
IFeatureWorkspace fWorkspace = (IFeatureWorkspace)workspace;
IDataset ipDs = fWorkspace.OpenFeatureClass(fcName) as IDataset;
ipDs.Delete();
File.Delete(shapeFilePath);
System.Runtime.InteropServices.Marshal.FinalReleaseComObject(workspace);
workspace = null;
fWorkspace = null;
ipDs = null;
}
GC.Collect();
}