ArcGIS Pro 3.3 API Reference Guide
ArcGIS.Core.Data Namespace / QueryFilter Class
Members Example

In This Topic
    QueryFilter Class
    In This Topic
    Represents a filter for performing a query against a Table.
    Object Model
    QueryFilter ClassSpatialReference Class
    public class QueryFilter 
    Public Class QueryFilter 
    Querying a feature layer
    var count = await QueuedTask.Run(() =>
      QueryFilter qf = new QueryFilter()
        WhereClause = "Class = 'city'"
      //Getting the first selected feature layer of the map view
      var flyr = (FeatureLayer)MapView.Active.GetSelectedLayers()
      using (RowCursor rows = flyr.Search(qf)) //execute
        //Looping through to count
        int i = 0;
        while (rows.MoveNext()) i++;
        return i;
       "Total features that matched the search criteria: {0}", count));
    Inheritance Hierarchy



    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also