The Art of Programming

How To Get All Features in FeatureClass with ArcObjects

2. February 2011 18:27 by Scott in   //  Tags:   //   Comments (65)

Something I couldn’t easily find on the interwebs so I decided to post it just incase anyone else had trouble with it.


                        //gets all features in featureclass
                        IFeatureCursor featureCursorGet = featureClass.Search(null, false);
                        //starts the first feature
                        IFeature feature = featureCursorGet.NextFeature();
                        //gets the column ID where we can find the report ID
                        while (feature != null)
                           feature = featureCursorGet.NextFeature();