This document is archived and information here might be outdated.  Recommended version.

IEditor.SelectionCount Property (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Editor > ESRI.ArcGIS.Editor > Interfaces > IE > IEditor Interface > IEditor.SelectionCount Property
ArcGIS Developer Help

IEditor.SelectionCount Property

The number of selected features which are editable.

[Visual Basic .NET]
Public ReadOnly Property SelectionCount As Integer
public int SelectionCount {get;}

Product Availability

Available with ArcGIS Desktop.


This property returns the Map's total number of selected features belonging to editable layers.

public void GetMapSelection()
  //Get a reference to IApplication app in ICommand::OnCreate hook parameter.
  IEditor sEditor = app.FindExtensionByName("ESRI Object Editor") as IEditor;
  IEnumFeature enumFeature = sEditor.EditSelection;
  IFeature selFeature = enumFeature.Next();
  for (int fCount = 0; fCount < sEditor.SelectionCount; fCount++)
    IGeometry selGeometry = selFeature.Shape;
    'Code to do something with the geometry
     selFeature = enumFeature.Next;

See Also

IEditor Interface