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


IEnumVertex.QueryPrevious Method (ArcObjects .NET 10.4 SDK)
ArcObjects Library Reference (Geometry)  

IEnumVertex.QueryPrevious Method

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

[Visual Basic .NET]
Public Sub QueryPrevious ( _
    ByVal vertex As IPoint, _
    ByRef outPartIndex As Integer, _
    ByRef vertexIndex As Integer _
)
[C#]
public void QueryPrevious (
    IPoint vertex,
    ref int outPartIndex,
    ref int vertexIndex
);
[C++]
HRESULT QueryPrevious(
  IPoint* vertex,
  long* outPartIndex,
  long* 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 QueryPrevious method returns the vertex before the current location of the Enumerator. As oppose to the Previous method the output point needs to be cocreated before to call QueryPrevious. The QueryPrevious method is faster than the Previous method because it doesn't need to create a point internally each time. The QueryPrevious method only populates the output point. For example, creating the point only once outside a loop and reuse it in the QueryPrevious method will be faster than calling Previous each time.

Remarks

Note: The output geometry must be co-created prior to the query. The output geometry 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 could improve performance.

See Also

IEnumVertex Interface