ArcGIS Pro 3.0 API Reference Guide
ArcGIS.Desktop.Editing Namespace / EditOperation Class / Delete Method / Delete(Table,IEnumerable<Int64>) Method
The table of the rows to delete.
The set of objectIDs of the rows to delete.
Example

In This Topic
    Delete(Table,IEnumerable<Int64>) Method
    In This Topic
    Delete rows. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    public void Delete( 
       Table table,
       IEnumerable<long> oids
    )
    Public Overloads Sub Delete( _
       ByVal table As Table, _
       ByVal oids As IEnumerable(Of Long) _
    ) 

    Parameters

    table
    The table of the rows to delete.
    oids
    The set of objectIDs of the rows to delete.
    Example
    Delete all the selected features in FeatureSceneLayer
    //must support editing!
    //var featSceneLayer = .... ;
    if (!featSceneLayer.HasAssociatedFeatureService || 
        !featSceneLayer.IsEditable)
      return;
    
    var delOp = new EditOperation()
    {
      Name = "Delete selected features"
    };
    //Assuming we have a selection on the layer...
    delOp.Delete(featSceneLayer, featSceneLayer.GetSelection().GetObjectIDs());
    await delOp.ExecuteAsync();//await if needed but not required
    
    Requirements

    Target Platforms: Windows 11, Windows 10, Windows 8.1

    See Also