ArcObjects Library Reference (GeoDatabase)  

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,
  long* numFeatures
);
[C++]

Parameters

QueryFilter [in]

  QueryFilter is a parameter of type IQueryFilter

numFeatures [out, retval]   numFeatures is a parameter of type long

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 (Code Files: CalculateAreaFunction)

.NET Related Topics

Geodatabase