How to delete a FGDB withvb.net or c#

522
2
07-24-2020 11:06 AM
JoseSanchez
Occasional Contributor III

Hello

How can I delete a FGDB using vb.net, C# and ArcObjects?

something than i Python takes 2 lines:

# Delete Existing FGDB
if arcpy.Exists(fgdb 😞
      arcpy.Delete_management(fgdb )

0 Kudos
2 Replies
DuncanHornby
MVP Notable Contributor

A way of doing that is to run the very geoprocessing tool you show. You access all the geoprocessing tools through the IGeoProcessor Interface. There are many examples on geonet and GIS SE for you to review.

0 Kudos
by Anonymous User
Not applicable

FGDB is a folder in the windows system, so you just need Directory.Delete("c:\abc.gdb"); in C#.

0 Kudos