ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Desktop.Core Namespace / Project Class / DeleteMetadataContent Method
Example Version

DeleteMetadataContent Method (Project)
Delete certain content from the metadata of the current item. This method must be called on the MCT. Use QueuedTask.Run.
Syntax
public void DeleteMetadataContent( 
   MDDeleteContentOption deleteOption
)

Parameters

deleteOption
Exceptions
ExceptionDescription
This method or property must be called within the lambda passed to QueuedTask.Run.
Example
Item: Delete certain content from the metadata of the current item: DeleteMetadataContent
Item featureClassWithMetadataItem = ItemFactory.Instance.Create(@"C:\projectBeta\GDBs\regionFive.gdb\SourceFeatureClass");
//Delete thumbnail content from item's metadata
await QueuedTask.Run(() => featureClassWithMetadataItem.DeleteMetadataContent(MDDeleteContentOption.esriMDDeleteThumbnail));
Requirements

Target Platforms: Windows 11, Windows 10

ArcGIS Pro version: 3 or higher.
See Also