delete a shapefile

Mar 11, 2011 at 1:39 PM

Hi people,

i need to delete a shapefile at runtime; first of all, i call the close() function and then i call the system::io::file::delete(shapefile.shp)

but i have an exception:the file is in use...

so, maybe  i need to perform some other operation in addition to close()???

Thanks a lot

Mar 13, 2011 at 1:02 PM

In case the shapefile was added to the map, try to remove the layer first.  Show us your code in case this won't help.