Where is the feature class in use? If it's in your map document then you probably need to disconnect the layer from its data source (IDataLayer2.Disconnect) and delete it from the map.
Use IDataset.Delete. I would imagine you can't delete feature datasets unless they are empty though.
IDataset pdataset; pdataset = (ESRI.ArcGIS.Geodatabase.IDataset)featureClass; if (pdataset.CanDelete() && pdataset != null) pdataset.Delete(); // Throw exception
Membros conectados podem postar, seguir atualizações e mais. Novo aqui? Registre uma conta gratuita.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.