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


IIndexQuery2.WithinFeature Method (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Carto > ESRI.ArcGIS.Carto > Interfaces > II > IIndexQuery2 Interface > IIndexQuery2.WithinFeature Method
ArcGIS Developer Help

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