This document is archived and information here might be outdated.  Recommended version.


IEditor.EditWorkspace Property (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Editor > ESRI.ArcGIS.Editor > Interfaces > IE > IEditor Interface > IEditor.EditWorkspace Property
ArcGIS Developer Help

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