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


IEnumVertex.QueryNext Method (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Geometry > ESRI.ArcGIS.Geometry > Interfaces > IE > IEnumVertex Interface > IEnumVertex.QueryNext Method
ArcGIS Developer Help

IEnumVertex.QueryNext Method

Copies the next vertex to the input parameter and returns its location in the geometry.

[Visual Basic .NET]
Public Sub QueryNext ( _
    ByVal vertex As IPoint, _
    ByRef outPartIndex As Integer, _
    ByRef vertexIndex As Integer _
)
[C#]
public void QueryNext (
    IPoint vertex,
    ref int outPartIndex,
    ref int vertexIndex
);
[C++]
HRESULT QueryNext(
  IPoint* vertex,
  System.Int32* outPartIndex,
  System.Int32* vertexIndex
);
[C++]
Parameters
vertex 

vertex is a parameter of type IPoint* outPartIndex [out]
outPartIndex is a parameter of type long* vertexIndex [out]
vertexIndex is a parameter of type long*

Product Availability

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

Description

The QueryNext method query the next vertex in the enumerator. Different from the Next method, the output point needs to be cocreated before calling QueryNext. The QueryNext method is faster than the Next method because it doesn't need to create a point internally each time. The QueryNext method only populates the output point.

Remarks

Note: The output point must be co-created prior to use the query. The output point is not co-created by the method, it is populated. This can be used in performance critical situations. For example, creating the geometry only once outside a loop and use the query method inside the loop could improve performance compare to calling Next method which needs to co-create point each time.

See Also

IEnumVertex Interface