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


IEnumRow Interface (ArcObjects .NET 10.4 SDK)
ArcObjects Library Reference (Editor)  

IEnumRow Interface

Provides access to members that enumerate rows in sequence.

Product Availability

Available with ArcGIS Desktop.

When To Use

Use the IEnumRow object when you need to maintain a collection of IRow objects.

The collection itself can consist of any object that implements the IRow interface. For example, the Feature coclass implements the IRow interface so you can use the IEnumRow object to maintain a collection of features.

Members

Description
Read-only property Count The number of rows.
Method Next Retrieves the next row in the sequence.
Method Reset Resets the enumeration sequence to the beginning.

Remarks

The IEnumRow object is an enumeration and methods to cycle through it.

Use the Count method to identify how many objects exist within the collection.

Use the Next method to retrieve the next object in the enumeration.

Use the Reset method to reset the enumeration to the first object in the collection.

Click on the example to see the associate example of how the IEnumRow interface can be used when building a custom feature inspector. Also note that this example does not fully explain what a custom feature inspector is. Refer to the documentation of IObjectInspector for details.
 
 
[C#]
 IEnumFeature enumRow=null; 
IFeature feature=enumRow as IFeature;
if (feature != null)
{
Windows.Forms.MessageBox.Show("Row OID in Enum" + feature.OID);
pFeature=enumRow.Next();
}

 

 

 

See Also

IRow Interface | IFeature Interface | IFeatureCursor Interface | IObjectInspector Interface

.NET Samples

Tabbed feature inspector (Code Files: ObjectInspector)