ArcObjects Library Reference (Editor)  

IEditor.EditWorkspace Property

Reference to the workspace being edited.

[Visual Basic .NET]
Public ReadOnly Property EditWorkspace As IWorkspace
[C#]
public IWorkspace EditWorkspace {get;}

Product Availability

Available with ArcGIS Desktop.

Remarks

The EditWorkspace property returns a reference to the workspace being edited, only one workspace is editable at a time. StartEditing sets this property as it has a required IWorkspace parameter. The following example shows one possible way to use the EditWorkspace property.
[C#]
 public void saveEdits()
    {
      IWorkspace editWorkspace;
      //assumes you have a featureclass variable declared and set already as 
      //IfeatureClass featureClass.
      editWorkspace = featureClass.FeatureDataset.Workspace;
      UID editUid = new UIDClass();
      editUid.Value = "esriEditor.Editor";
      //You can get app from ICommand :: OnCreate() hook parameter   
      m_editor = m_app.FindExtensionByCLSID(editUid);
      editWorkspace = m_editor.EditWorkspace;
      m_editor.StopEditing(true);
      m_editor.StartEditing(editWorkspace);
    }

See Also

IEditor Interface

.NET Samples

Curve conversion add-in (Code Files: CurveConversionDockWin)

.NET Related Topics

Managing edit sessions and edit operations