ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Desktop.Editing Namespace / EditOperation Class / Delete Method / Delete(MapMember,Int64) Method
A layer or standalone table.
The objectID of the feature or row to delete.
Example

In This Topic
    Delete(MapMember,Int64) Method
    In This Topic
    Delete a feature or row.
    Syntax
    Public Overloads Sub Delete( _
       ByVal mapMember As MapMember, _
       ByVal oid As Long _
    ) 
    public void Delete( 
       MapMember mapMember,
       long oid
    )

    Parameters

    mapMember
    A layer or standalone table.
    oid
    The objectID of the feature or row to delete.
    Example
    Edit Operation Delete Features
    // Deletes a single feature from the specified feature layer using its ObjectID.
    await QueuedTask.Run(() =>
          {
            var deleteFeatures = new EditOperation() { Name = "Delete single feature" };
            //Delete a row in a standalone table
            deleteFeatures.Delete(featureLayer, objectId);
            //Execute to execute the operation
            //Must be called within QueuedTask.Run
            if (!deleteFeatures.IsEmpty)
            { //Execute and ExecuteAsync will return true if the operation was successful and false if not
              var result = deleteFeatures.Execute();
              //or use async flavor
              //await deleteFeatures.ExecuteAsync();
            }
          });
    Requirements

    Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)

    ArcGIS Pro version: 3.0 or higher.
    See Also