Public void iworkspaceedit_example (iworkspace workspace, string nameoffeatureclass)
{
Ifeatureworkspace featureworkspace = (ifeatureworkspace) Workspace;
Ifeatureclass featureclass = featureworkspace. openfeatureclass (nameoffeatureclass );
Iworkspaceedit workspaceedit = (iworkspaceedit) Workspace;
// Start editing with undo redo functionality
Workspaceedit. startediting (true );
Workspaceedit. starteditoperation ();
Ifeature feature = featureclass. getfeature (1 );
Feature. Delete ();
Workspaceedit. stopeditoperation ();
Console. writeline ("wocould you like to undo your operation? Y or N ");
String response = console. Readline ();
If (response. toupper () = "Y ")
{
Workspaceedit. undoeditoperation ();
}
Bool hasedits = false;
Workspaceedit. hasedits (ref hasedits );
If (hasedits)
{
Console. writeline ("wocould you like to save your edits? Y or N ");
Response = console. Readline ();
If (response. toupper () = "Y ")
{
Workspaceedit. stopediting (true );
}
Else
{
Workspaceedit. stopediting (false );
}
}
}