ArcGIS Pro 2.9 API Reference Guide
Delete Method (SchemaBuilder)
Example 

ArcGIS.Core.Data.DDL Namespace > SchemaBuilder Class : Delete Method
Indicates the object to be deleted.
Enqueue the delete operation on the object with the name referred to by the Description.
Syntax
public void Delete( 
   Description description
)
Public Sub Delete( _
   ByVal description As Description _
) 

Parameters

description
Indicates the object to be deleted.
Exceptions
ExceptionDescription
description is null.
Remarks
When deleting domains, a CodedValueDomainDescription must be used to delete a ArcGIS.Core.Data.CodedValueDomain and a RangeDomainDescription must be used to delete a ArcGIS.Core.Data.RangeDomain.
Example
// Deleting a FeatureDataset named as 'Parcel_Information'

FeatureDatasetDefinition featureDatasetDefinition = geodatabase.GetDefinition<FeatureDatasetDefinition>("Parcel_Information");
FeatureDatasetDescription featureDatasetDescription = new FeatureDatasetDescription(featureDatasetDefinition);
      
SchemaBuilder schemaBuilder = new SchemaBuilder(geodatabase);

// Delete an existing feature dataset named as 'Parcel_Information'
schemaBuilder.Delete(featureDatasetDescription);
schemaBuilder.Build();
// Create a FileGeodatabaseConnectionPath with the name of the file geodatabase you wish to delete
FileGeodatabaseConnectionPath fileGeodatabaseConnectionPath = new FileGeodatabaseConnectionPath(new Uri(@"C:\Path-To-File-Geodatabase\YourName.gdb"));

// Delete the file geodatabase
SchemaBuilder.DeleteGeodatabase(fileGeodatabaseConnectionPath);
Requirements

Target Platforms: Windows 11, Windows 10, Windows 8.1

See Also

Reference

SchemaBuilder Class
SchemaBuilder Members