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


IFeatureClass.Select Method (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Geodatabase > ESRI.ArcGIS.GeoDatabase > Interfaces > IF > IFeatureClass Interface > IFeatureClass.Select Method
ArcGIS Developer Help

IFeatureClass.Select Method

Returns a selection That contains the object ids selected by the specified query.

[Visual Basic .NET]
Public Function Select ( _
    ByVal QueryFilter As IQueryFilter, _
    ByVal selType As esriSelectionType, _
    ByVal selOption As esriSelectionOption, _
    ByVal selectionContainer As IWorkspace _
) As ISelectionSet
[C#]
public ISelectionSet Select (
    IQueryFilter QueryFilter,
    esriSelectionType selType,
    esriSelectionOption selOption,
    IWorkspace selectionContainer
);
[C++]
HRESULT Select(
  IQueryFilter* QueryFilter,
  esriSelectionType selType,
  esriSelectionOption selOption,
  IWorkspace* selectionContainer
);
[C++]
Parameters
QueryFilter [in]

QueryFilter is a parameter of type IQueryFilter* selType [in]
selType is a parameter of type esriSelectionType selOption [in]
selOption is a parameter of type esriSelectionOption selectionContainer [in]
selectionContainer is a parameter of type IWorkspace*

Product Availability

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

Remarks

Select will return an ISelectionSet with all of the features that satisfy some attribute and/or spatial query as specified by an IQueryFilter object. If Nothing is given as the IQueryFilter, then the selection will have all of the features from the feature class.

Calling the Select method in IFeatureClass has the same effect as calling the corresponding method in ITable.

The selType parameter determines the type of selection set that will be created: an ID set, a snapshot, or a hybrid. See the ISelectionSet interface for a comparison of the three types.

When calling Select the selectionContainer parameter is no longer required. A null value should be passed as this parameter. 

See Also

IFeatureClass Interface | ISelectionSet Interface | IQueryFilter Interface