根据要素集名称进行判断
private bool IWorkspaceIsExistDataset(IWorkspace pWorkspace,string strname) { IEnumDataset pEnumDataset = pWorkspace.get_Datasets(esriDatasetType.esriDTFeatureDataset); pEnumDataset.Reset(); IDataset pDataset = pEnumDataset.Next(); bool ExistDataset = false; #region 判断要素集是否存在 while (pDataset != null) { if (pDataset.Name == strname) { ExistDataset = true; break; } pDataset = pEnumDataset.Next(); } return ExistDataset; }