IIndexQuery2.WithinFeature Method (ArcObjects .NET 10.6 SDK)
ArcObjects Library Reference (Carto)  

IIndexQuery2.WithinFeature Method

Finds the first feature that the input shape lies within.

[Visual Basic .NET]
Public Function WithinFeature ( _
    ByVal pShape As IGeometry _
) As Integer
[C#]
public int WithinFeature (
    IGeometry pShape
);
[C++]
HRESULT WithinFeature(
  IGeometry* pShape
);
[C++]

Parameters pShape [in]
pShape is a parameter of type IGeometry*

Product Availability

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

Description

Returns the ObjectID of the first feature in the spatial index for which the input shape is within.  -1 is returned in the case where the input shape is not within any features in the index.

See Also

IIndexQuery2 Interface