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


IFeatureCursor.NextFeature Method (ArcObjects .NET 10.5 SDK)
ArcObjects Library Reference (GeoDatabase)  

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(
  IFeature** Object
);
[C++]

Parameters Object [out, retval]
Object is a parameter of type IFeature

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 Snippets

Get First Feature from Point Search in GeoFeatureLayer | Zoom to Selected Globe Features

.NET Samples

Custom reshape polyline edit task (Code Files: ReshapePolylineEditTask) | ViperPin tool (Code Files: ViperPinForm) | Extending the replication synchronization process (Code Files: RasterSyncWorkspaceExtension) | Calculate area geoprocessing function tool (Code Files: CalculateAreaFunction) | RSS weather GraphicTracker (Code Files: RSSWeather) | Get and set key properties on a mosaic dataset (Code Files: GetSetKeyProperty) | StreetMap routing (Code Files: RoutingForm) | RSS weather layer (Code Files: RSSWeatherLayerClass) | Multivariate renderer (Code Files: MultivariateRenderer) | Create camera flyby from path (Code Files: frmCameraPath)

.NET Related Topics

Updating features | 3DAnalyst | Defining a renderer for a layer | Executing spatial queries | Geodatabase API best practices | How to add point IDs to a polyline | How to create a union of several polygons | How to zoom to selected features in globe | Querying geodatabase tables | Updating attributes of existing features