IFeatureClass pTargetFeatureClass; pTargetFeatureClass = GetFeatureClassFromShapefileOnDisk("c:\\", "feature_name");
IFeatureLayer pTargetFeatureLayer = pTargetFeatureClass as IFeatureLayer;
IFeatureClass myFeature = CreateFeatureClassWithSR("MyPoints", (IFeatureWorkspace)workspace, gds); if(myFeature != null) { //Create an IFeatureLayer IFeatureLayer featureLayer = new FeatureLayerClass(); CreateDummyPoint(myFeature); featureLayer.FeatureClass = myFeature; ILayer layer = (ILayer)featureLayer; layer.Name = featureLayer.FeatureClass.AliasName; IMxDocument mxDocument = (IMxDocument)myApplication.Document; IMap map = mxDocument.FocusMap; map.AddLayer(layer); }