ArcGIS Pro 2.7 API Reference Guide
Select(QueryFilter,SelectionCombinationMethod,TimeRange,RangeExtent) Method

ArcGIS.Desktop.Mapping Namespace > BasicFeatureLayer Class > Select Method : Select(QueryFilter,SelectionCombinationMethod,TimeRange,RangeExtent) Method
A query filter or spatial filter to perform spatial search.
A combination method.
A time filter only works if the layer is time enabled.
A range filter only works if the layer is range enabled.
Selects features based upon the specified attribute and/or spatial criteria and combination method. For stream layer, you should call ArcGIS.Core.Data.Realtime.RealtimeFeatureClass.StopStreaming for predictable result. This method must be called on the MCT. Use QueuedTask.Run.
Syntax

Parameters

queryFilter
A query filter or spatial filter to perform spatial search.
method
A combination method.
time
A time filter only works if the layer is time enabled.
range
A range filter only works if the layer is range enabled.

Return Value

Exceptions
ExceptionDescription
This method or property must be called within the lambda passed to QueuedTask.Run.
Remarks

Features are highlighted on the map and on the table view as a result of this method call.
If there is a definition query set on the feature layer, the Select() method will automatically work on the subset of features in the feature layer that meet the definition criteria. You specify an additional query that will be applied after the feature layer's definition query by passing valid QueryFilter object for the QueryFilter parameter.
If the feature layer has any joins, this Select() method takes that into account.
You can use the cursor returned by Search to update features.

To ensure maximum robustness, callers should explicitly dispose of the returned ArcGIS.Core.Data.Selection in either a using statement or a finally block.

For stream layers, especially with high velocity real-time updates, features might get expired (removed) from the selection set.

Requirements

Target Platforms: Windows 10, Windows 8.1

See Also

Reference

BasicFeatureLayer Class
BasicFeatureLayer Members
Overload List