AnsweredAssumed Answered

Using IfeatureCursor to location a feature

Question asked by ihussein1 on Apr 4, 2016
Latest reply on Apr 6, 2016 by ihussein1

I have a IfeatureCursor that I initialized to null. When I try to set it with a IfeatsureSelection.SelectionSet.Search(,,out IfetureCursor) I get an error saying


cannot convert 'out ESRI.ArcGIS.Geodatabase.IFeatureCursor' to 'out ESRI.ArcGIS.Geodatabase.ICursor'




            void SelectionChangedFunc()
                IFeatureSelection featSel = default(IFeatureSelection); //link to a feature selection
                IFeatureCursor selCur = null;                           //feature cursor to iterate
                IFeature f = default(IFeature);                         //link to a feature

                featSel = p_addressLayer as IFeatureSelection;
                MessageBox.Show("changed"); //debugging purposes

                if (featSel.SelectionSet.Count > 0)
                    featSel.SelectionSet.Search(null, false, out selCur);
                    f = selCur.NextRow();
                    MessageBox.Show(f.Fields.FindField("STR_NAME").ToString()); //debugging purposes
                    MessageBox.Show(selCur.Fields.FindField("STR_NAME").ToString()); //debugging purposes


Line 15 is where the issue is. I tried casting with no luck. Anyone come accross this issue or was able to successfully use a IfeatureCursor in C# SDK 10.4