public sealed class Selection : ArcGIS.Core.CoreObjectsBase, System.IDisposable
Public NotInheritable Class Selection Inherits ArcGIS.Core.CoreObjectsBase Implements System.IDisposable
public sealed class Selection : ArcGIS.Core.CoreObjectsBase, System.IDisposable
Public NotInheritable Class Selection Inherits ArcGIS.Core.CoreObjectsBase Implements System.IDisposable
public async Task SelectingRowsFromATable() { await ArcGIS.Desktop.Framework.Threading.Tasks.QueuedTask.Run(() => { using (Geodatabase geodatabase = new Geodatabase(new DatabaseConnectionFile(new Uri("path\\to\\sde\\file\\sdefile.sde")))) using (Table enterpriseTable = geodatabase.OpenDataset<Table>("LocalGovernment.GDB.piCIPCost")) { QueryFilter anotherQueryFilter = new QueryFilter { WhereClause = "FLOOR = 1 AND WING = 'E'" }; // For Selecting all matching entries. using (Selection anotherSelection = enterpriseTable.Select(anotherQueryFilter, SelectionType.ObjectID, SelectionOption.Normal)) { } // This can be used to get one record which matches the criteria. No assumptions can be made about which record satisfying the criteria is selected. using (Selection onlyOneSelection = enterpriseTable.Select(anotherQueryFilter, SelectionType.ObjectID, SelectionOption.OnlyOne)) { } // This can be used to obtain a empty selction which can be used as a container to combine results from different selections. using (Selection emptySelection = enterpriseTable.Select(anotherQueryFilter, SelectionType.ObjectID, SelectionOption.Empty)) { } // If you want to select all the records in a table. using (Selection allRecordSelection = enterpriseTable.Select(null, SelectionType.ObjectID, SelectionOption.Normal)) { } } }); }
System.Object
ArcGIS.Core.CoreObjectsBase
ArcGIS.Core.Data.Selection
Target Platforms: Windows 11, Windows 10