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


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

IFeatureCursor.NextFeature Method

Advance the position of the cursor by one and return the Feature object at that position.

[Visual Basic .NET]
Public Function NextFeature ( _
) As IFeature
[C#]
public IFeature NextFeature (
);
[C++]
HRESULT NextFeature(
void
);

Product Availability

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

Remarks

If you fetch features out of a geodatabase using a cursor (recycling or non recycling), the spatial reference of the feature, as returned by NextFeature, is guaranteed to be in the spatial reference that you specified in the query filter .

 

No guarantee however is made that the geometry of the feature will continue to remain in this spatial reference. In particular, if you use a non recycling cursor, then the feature you fetch will be shared with other consumers and any one of these may change its spatial reference at any time. It is the developers responsibility to test the spatial reference or the geometry you get from the feature (via IFeature::Shape) if you retrieve the geometry at a later time and rely on its spatial reference being a specified spatial reference.

See Also

IFeatureCursor Interface

.NET Samples

Create camera flyby from path Custom reshape polyline edit task Get and set key properties on a mosaic dataset Calculate area geoprocessing function tool Multivariate renderer Extending the replication synchronization process RSS weather GraphicTracker RSS weather layer StreetMap routing ViperPin tool