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


IFields.FieldCount Property (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Geodatabase > ESRI.ArcGIS.GeoDatabase > Interfaces > IF > IFields Interface > IFields.FieldCount Property
ArcGIS Developer Help

IFields.FieldCount Property

The number of fields in the fields collection.

[Visual Basic .NET]
Public ReadOnly Property FieldCount As Integer
[C#]
public int FieldCount {get;}
[C++]
HRESULT get_FieldCount(
  System.Int32* numFields
);
[C++]
Parameters
numFields [out, retval]

numFields is a parameter of type long*

Product Availability

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

Remarks

FieldCount is a one-based index. Therefore if you want to use IFields::FieldCount to get a particular index and use IFields::Field to get the field at the particular index, you will need to convert FieldCount to a zero-based index.

See Also

IFields Interface

.NET Samples

Single line address geocoding StreetMap routing Retrieve a color ramp from the SymbologyControl ViperPin tool