ArcGIS Pro 2.9 API Reference Guide
DeleteMetadataContent Method (Item)
Example 

ArcGIS.Desktop.Core Namespace > Item Class : DeleteMetadataContent Method
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
)
Public Sub DeleteMetadataContent( _
   ByVal deleteOption As MDDeleteContentOption _
) 

Parameters

deleteOption
Exceptions
ExceptionDescription
This method or property must be called within the lambda passed to QueuedTask.Run.
Example
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, Windows 8.1

See Also

Reference

Item Class
Item Members