IName接口
命名空间:ESRI.ArcGIS.esriSystem
使用:利用IName来打开一个工作空间
Members
Description | ||
---|---|---|
NameString | The name string of the object. | |
Open | Opens the object referred to by this name. |
public object Open ( );例如:
<span style="white-space:pre"> </span>Type factoryType = Type.GetTypeFromProgID("esriDataSourcesGDB.AccessWorkspaceFactory"); IWorkspaceFactory pWksFacory = (IWorkspaceFactory)Activator.CreateInstance(factoryType); IWorkspaceName pWksName = <span style="font-family: Arial, Helvetica, sans-serif;">pWksFacory </span><span style="font-family: Arial, Helvetica, sans-serif;">.Create(sPath, sName, null, 0);</span> if (pWksName != null) { object obj = (pWksName as IName).Open(); pWks = obj as IWorkspace; }