Hi, I want to display a shapefile and then edit or delete it, but I get the error: "The process cannot access the file 'C:\Zone.shp' because it is being used by another process." How must I close the shapefile to release it? I am using this code:
Dim newPolyLineShapeFile As New ShapeFileFeatureLayer("Zone.shp", ShapeFileReadWriteMode.ReadWrite)
newPolyLineShapeFile.Open()
newPolyLineShapeFile.FeatureSource.BeginTransaction()
newPolyLineShapeFile.FeatureSource.AddFeature(Feature)
newPolyLineShapeFile.FeatureSource.CommitTransaction()
winformsMap1.StaticOverlay.Layers.Add(newPolyLineShapeFile)
newPolyLineShapeFile.Close()
newPolyLineShapeFile =
Nothing
File.Delete(
"Zone.shp")