string pShpFilePath = pFullPath;
int index = 0;
//获取最后一个“\\”时的索引位置
index = pShpFilePath.LastIndexOf("\\");
//获得shp文件的路径
string filePath = pShpFilePath.Substring(0, index);
//获得shp文件名
string fileName = pShpFilePath.Substring(index + 1, pShpFilePath.Length - (index + 1));
//由工作空间工厂创建shp工作空间工厂类
IWorkspaceFactory pWorkspaceFactory = new ShapefileWorkspaceFactoryClass();
//打开shp文件的路径目录, 并强转赋予要素工作空间
IFeatureWorkspace pFeatureWorkspace = pWorkspaceFactory.OpenFromFile(filePath, 0) as IFeatureWorkspace;
//创建要素图层
IFeatureLayer pFeatureLayer = new FeatureLayerClass();
//打开文件名
pFeatureLayer.FeatureClass = pFeatureWorkspace.OpenFeatureClass(fileName);
//定义pFLayer的别名