// For sde DatabaseConnectionFile connector = new DatabaseConnectionFile(new Uri(sdePath)); // For gdb FileGeodatabaseConnectionPath connector = new FileGeodatabaseConnectionPath(new Uri(gdbPath)); // coomon part using (Geodatabase gdb = new Geodatabase(connector)) { var defs = gdb.GetDefinitions<TableDefinition>(); foreach (var d in defs) { string dsName = d.GetName(); // your code here d.Dispose(); } }