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

IClass.FindField Method (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Geodatabase > ESRI.ArcGIS.GeoDatabase > Interfaces > IC > IClass Interface > IClass.FindField Method
ArcGIS Developer Help

IClass.FindField Method

The index of the field with the specified name.

[Visual Basic .NET]
Public Function FindField ( _
    ByVal Name As String _
) As Integer
public int FindField (
    string Name
HRESULT FindField(
  BSTR Name
Name [in]

Name is a parameter of type BSTR

Product Availability

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


If FindField returns -1, the Field could not be found in the Fields collection.

Developers working with SDE should be aware of qualified field names and their impact on calls to FindField. For more information, see the IFields2 interface.

See Also

IClass Interface

.NET Samples

Closest facility solver Calculate area geoprocessing function tool Location-allocation solver Origin-destination cost matrix solver Extending the replication synchronization process RSS weather GraphicTracker RSS weather layer Utility wizard for basic schematic datasets configuration Reducing schematic nodes and computing a cumulative attribute via a schematic rule Service area solver Retrieve a color ramp from the SymbologyControl Play back tracking data Timestamper class extension Vehicle routing problem solver