ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Core.Data Namespace / TableDefinition Class / FindField Method
The name of the field to be found.
Version

FindField Method (TableDefinition)
Gets the index position for a field by name. This method must be called on the MCT. Use QueuedTask.Run.
Syntax
public int FindField( 
   string fieldName
)

Parameters

fieldName
The name of the field to be found.

Return Value

A positive integer value if the field is found indicating the index position of the field. If a field is not found with a name matching the fieldName a -1 is returned.
Exceptions
ExceptionDescription
A geodatabase-related exception has occurred.
Remarks
The field's index returned from the TableDefinition may not always be the exact index returned from other objects, such as RowCursor and value.
Requirements

Target Platforms: Windows 11, Windows 10

ArcGIS Pro version: 3 or higher.
See Also