在各种WorkSpace中判断要打开的文件(如:栅格,要素)是否存在
//IWorkspace DatasetNames Example public void IWorkspace_DatasetNames_Example(IWorkspace workspace) { //This function asks the workspace for its feature dataset names. //The names are returned as an enumeration which is cycled through and the //name of each dataset is printed. IEnumDatasetName enumDatasetName = workspace.get_DatasetNames(esriDatasetType.esriDTFeatureDataset); IDatasetName datasetName = enumDatasetName.Next(); while (datasetName != null) { Console.WriteLine(datasetName.Name); datasetName = enumDatasetName.Next(); } }