I have a folder contain 5 shapefiles.
I want to develop C# code for adding the 5 shapefiles with single button click.
I have created code for adding a single shapefile but how can I add multiple shapefiles?
ESRI.ArcGIS.ArcMapUI.IMxDocument mxd = ArcMap.Application.Document as ESRI.ArcGIS.ArcMapUI.IMxDocument;
ESRI.ArcGIS.Carto.IMap map = mxd.FocusMap;
ESRI.ArcGIS.Geodatabase.IWorkspaceFactory wsf = new ESRI.ArcGIS.DataSourcesFile.ShapefileWorkspaceFactory();
ESRI.ArcGIS.Geodatabase.IWorkspace ws = wsf.OpenFromFile(@"D:\ARC OBJECTS\Kothagudem Attribute Data", ArcMap.Application.hWnd);
ESRI.ArcGIS.Geodatabase.IFeatureWorkspace fws = ws as ESRI.ArcGIS.Geodatabase.IFeatureWorkspace;
ESRI.ArcGIS.Geodatabase.IFeatureClass fcls = fws.OpenFeatureClass("Agriculture.shp");
ESRI.ArcGIS.Carto.IFeatureLayer lay = new ESRI.ArcGIS.Carto.FeatureLayerClass();
lay.FeatureClass = fcls;
lay.Name = fcls.AliasName;
map.AddLayer(lay);