I'm new to ArcEngine, I want to add a SHAPE FILE to map control through code, plz help me
i know how to add in arcmap but as IMxdocument belongs to arcmap i stucked here
IWorkspaceFactory pwsfactory = new ESRI.ArcGIS.DataSourcesGDB.FileGDBWorkspaceFactoryClass();
IFeatureWorkspace pwspace = pwsfactory.OpenFromFile("D:\check\decision.gdb", 0);
IFeatureClass pfclass = pwspace.OpenFeatureClass("awe");
IFeatureLayer pflayer = new ESRI.ArcGIS.Carto.FeatureLayerClass();
pflayer.FeatureClass= pfclass;
pflayer.Name=pfclass.AliasName;