ArcObjects Library Reference  (GeoDatabase)    

IRow.OID Property

The OID for the row.

[Visual Basic 6.0]
Property OID As Long
[Visual Basic .NET]
Public ReadOnly Property OID As Integer
[C#]
public int OID {get;}
[Java]
public  getOID (
    Long OID
)
[C++]
HRESULT get_OID(
  long* OID
);
[C++]

Parameters

OID [out, retval]

  OID is a parameter of type long

Product Availability

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

Description

Gets the OID for a row in a table that has a unique Object ID, such as tables registered with the geodatabase.

[C#]

    public void IRow_get_OID(IRow row)
    {
        //check if a row has an OID
        if (row.HasOID)
        {
            // do something...
            Console.WriteLine("The row has an OID of {0}", row.OID);
        }
    }

[Visual Basic 6.0]

Example:

If pRow.HasOID Then
  Debug.Print pRow.OID
End If

See Also

IRow Interface