This document is archived and information here might be outdated.  Recommended version.


IFeatureClass.FeatureCount Method (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Geodatabase > ESRI.ArcGIS.GeoDatabase > Interfaces > IF > IFeatureClass Interface > IFeatureClass.FeatureCount Method
ArcGIS Developer Help

IFeatureClass.FeatureCount Method

The number of features selected by the specified query.

[Visual Basic .NET]
Public Function FeatureCount ( _
    ByVal QueryFilter As IQueryFilter _
) As Integer
[C#]
public int FeatureCount (
    IQueryFilter QueryFilter
);
[C++]
HRESULT FeatureCount(
  IQueryFilter* QueryFilter
);
[C++]
Parameters
QueryFilter [in]

QueryFilter is a parameter of type IQueryFilter*

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Remarks

FeatureCount returns the number of features that satisfy some attribute and/or spatial query as specified by an IQueryFilter object. If Nothing is supplied for the IQueryFilter, then FeatureCount returns the total number of features in the feature class.

See Also

IFeatureClass Interface | IQueryFilter Interface

.NET Samples

Calculate area geoprocessing function tool