// Must be called within QueuedTask.Run9) public bool TableExists(Geodatabase geodatabase, string tableName) { try { TableDefinition tableDefinition = geodatabase.GetDefinition<TableDefinition>(tableName); tableDefinition.Dispose(); return true; } catch { // GetDefinition throws an exception if the definition doesn't exist return false; } }
// Must be called within QueuedTask.Run() public bool FeatureClassExists(Geodatabase geodatabase, string featureClassName) { try { FeatureClassDefinition featureClassDefinition = geodatabase.GetDefinition<FeatureClassDefinition>(featureClassName); featureClassDefinition.Dispose(); return true; } catch { // GetDefinition throws an exception if the definition doesn't exist return false; } }
Target Platforms: Windows 11, Windows 10, Windows 8.1