ArcObjects Library Reference  (GeoDatabase)    

IDataset.Delete Method

Deletes this dataset.

[Visual Basic 6.0]
Sub Delete
[Visual Basic .NET]
Public Sub Delete ( _
)
[C#]
public void Delete (
);
[Java]
public void delete (
)
throws
    IOException,
    AutomationException
[C++]
HRESULT Delete(
void
);

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Errors Returned

-2147220474 - FDO_E_FEATURECLASS_NETWORK_CANNOT_DELETE

The feature class is in a geometric network and cannot be deleted until the geometric network is deleted.

-2147220462 - FDO_E_FEATURECLASS_TOPOLOGY_CANNOT_DELETE

The feature class is in a topology and cannot be deleted until the topology is deleted.

-2147220982 - FDO_E_OBJECT_IS_DELETED

The feature class has either already been deleted, or it has been moved into or out of a feature dataset.

Functional License Check

If your application/site is not appropriately licensed, Delete can return an Err.Number of FDO_E_NO_OPERATION_LICENSE.

Remarks

Certain feature classes, such as network and topology feature classes, cannot be deleted until their containing objects are deleted.

See Also

IDataset Interface