AnsweredAssumed Answered

EditOperation.Delete() fails

Question asked by bveldkamp on May 30, 2018
Latest reply on May 31, 2018 by RRuh-esristaff

I am playing with the ArcGIS Pro SDK, and got stuck when trying to delete a feature from a featureclass using an EditOperation.


While FeatureClass.DeleteRows() works fine, the following code throws an error:  No parameterless constructor defined for this object.


var result = await QueuedTask.Run(() =>
     using (var gdb = new Geodatabase(new FileGeodatabaseConnectionPath(new Uri(@"C:\Data\Test.gdb"))))
          var fc = gdb.OpenDataset<FeatureClass>("punten");
          var cursor = fc.Search(null, false);
          if (cursor.MoveNext())
               var editOp = new EditOperation
                    Name = "Een test"                   

               return editOp.Execute();

          return false;


Also, modifying a feature works perfect:

editOp.Modify(cursor.Current, "test", "Hello");


Am I missing something?