ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Core.Data Namespace / Row Class / Item Property / Item(String) Property
The attribute name or alias name of the field.
Example

In This Topic
    Item(String) Property
    In This Topic
    Gets and sets the value of a field given its attribute name or alias name. This indexer must be called on the MCT. Use QueuedTask.Run.
    Syntax
    public object Item( 
       string fieldName
    ) {get; set;}
    Public Overloads Property Item( _
       ByVal fieldName As String _
    ) As Object

    Parameters

    fieldName
    The attribute name or alias name of the field.

    Property Value

    The value of the field.
    Exceptions
    ExceptionDescription
    This table/feature does not support this operation. For example, it is from a joined table.
    A geodatabase-related exception has occurred. For example, fieldName is invalid or does not exist.
    The index of fieldName corresponds to a shape field index and the type of shape (i.e., geometry) is not supported.
    Remarks
    fieldName can be either an attribute name or alias name. If fieldName does not exist as an attribute name, it will be treated as an alias name. If the alias name still does not exist, an exception will be thrown. Furthermore, if the Field.FieldType corresponding to the specified fieldName is FieldType.Blob, the value will be System.IO.MemoryStream.
    Example
    Checking a field value for null
    object val = row[field.Name];
    if (val is DBNull || val == null)
    {
        // field value is null
    }
    else
    {
        // field value is not null
    }
    
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also