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


ISelectionSet.Search Method (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Geodatabase > ESRI.ArcGIS.GeoDatabase > Interfaces > IS > ISelectionSet Interface > ISelectionSet.Search Method
ArcGIS Developer Help

ISelectionSet.Search Method

Returns a cursor that can be used to retrieve the objects specified by a query over this selection set.

[Visual Basic .NET]
Public Sub Search ( _
    ByVal QueryFilter As IQueryFilter, _
    ByVal Recycling As Boolean, _
    ByRef Cursor As ICursor _
)
[C#]
public void Search (
    IQueryFilter QueryFilter,
    bool Recycling,
    ref ICursor Cursor
);
[C++]
HRESULT Search(
  IQueryFilter* QueryFilter,
  VARIANT_BOOL Recycling,
  ICursor** Cursor
);
[C++]
Parameters
QueryFilter [in]

QueryFilter is a parameter of type IQueryFilter* Recycling [in]
Recycling is a parameter of type bool Cursor [out]
Cursor is a parameter of type ICursor**

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Remarks

Search will return an ICursor with all of the rows that satisfy the constraints specified by a query filter. If a null value is provided for the QueryFilter parameter, the cursor will contain all of the selection set's rows.

The Recycling parameter controls row object allocation behavior.

Recycling cursors rehydrate a single feature/row object on each fetch and can be used to optimize read-only access, for example, when drawing. It is illegal to maintain a reference on a feature/row object returned by a recycling cursor across multiple calls to NextRow on the cursor. Feature/Row objects returned by a recycling cursor should not be modified. Non-recycling cursors return a separate object on each fetch.

The features/rows returned by a non-recycling cursor may be modified and stored with polymorphic behavior. The geodatabase guarantees "unique instance semantics" on non-recycling feature/row objects fetched during an edit session. If the object to be retrieved by a call to search has already been instantiated and is being referenced by the calling application, then a reference to the existing row object is returned.

See Also

ISelectionSet Interface

.NET Samples

Create camera flyby from path Custom reshape polyline edit task ArcGIS Network Analyst extension Engine application