I want to read a shapefile by Arcobject and C#. I used the ArcGIS Snippet and write follow code:
ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.Desktop);
IWorkspaceFactory wsf = new ShapefileWorkspaceFactory();
IWorkspace ws = wsf.OpenFromFile(@"E:\Data\shap file iran\IRN_adm\", 0);
IFeatureWorkspace fws = ws as IFeatureWorkspace;
IFeatureClass fc = fws.OpenFeatureClass("Province.shp");
but in line 3 returned error:
Exception from HRESULT: 0x80040228
Whats the matter?
User contributions licensed under CC BY-SA 3.0