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


IFeatureClass.GetFeatures 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.GetFeatures Method
ArcGIS Developer Help

IFeatureClass.GetFeatures Method

Get a cursor of Rows given a set of object ids.

[Visual Basic .NET]
Public Function GetFeatures ( _
    ByVal fids As Object, _
    ByVal Recycling As Boolean _
) As IFeatureCursor
[C#]
public IFeatureCursor GetFeatures (
    object fids,
    bool Recycling
);
[C++]
HRESULT GetFeatures(
  VARIANT fids,
  VARIANT_BOOL Recycling
);
[C++]
Parameters
fids [in]

fids is a parameter of type VARIANT Recycling [in]
Recycling is a parameter of type bool

Product Availability

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

Remarks

GetFeatures will return an IFeatureCursor which contains the features from the feature class with the parameter-specified Object IDs (OID). This method can be used to loop through a particular set of features with known Object IDs.

Calling the GetFeatures method from the IFeatureClass interface has the same effect as calling the GetRows method from the ITable interface except that the return value is an IFeatureCursor reference, rather than an ICursor reference.

The fids parameter should be provided with an integer array. If the array contains an invalid Object ID, no error will occur, and no feature will be retrieved for the value.

This method should not be called from .NET or Java applications. Instead, call IGeoDatabaseBridge.GetFeatures.

See Also

IFeatureClass Interface | IFeature Interface | IFeatureCursor Interface | IFeatureCursor Interface