ArcGIS Pro 2.6 API Reference Guide
GetCount Method (Selection)

ArcGIS.Core.Data Namespace > Selection Class : GetCount Method
Gets the count of how many items are currently contained in the selection. This method must be called on the MCT. Use QueuedTask.Run.
Syntax
public int GetCount()
Public Function GetCount() As Integer

Return Value

The number of items currently contained in the selection.
Exceptions
ExceptionDescription
A geodatabase-related exception has occurred.
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 7

See Also

Reference

Selection Class
Selection Members