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

IPointCollection.QueryPoint Method (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Geometry > ESRI.ArcGIS.Geometry > Interfaces > IP > IPointCollection Interface > IPointCollection.QueryPoint Method
ArcGIS Developer Help

IPointCollection.QueryPoint Method

Queries for a point in the PointCollection at given index.

[Visual Basic .NET]
Public Sub QueryPoint ( _
    ByVal Index As Integer, _
    ByVal Point As IPoint _
public void QueryPoint (
    int Index,
    IPoint Point
HRESULT QueryPoint(
  long Index,
  IPoint* Point

Index is a parameter of type long Point
Point is a parameter of type IPoint*

Product Availability

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


Queries the ith Point from the PointCollection.  The first Point in the PointCollection has index 0, and the last Point has index equal to PointCount - 1.  (Alternatively, the last Point in the PointCollection can be referenced using index -1.).


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

IPointCollection Interface

.NET Samples

Move a graphic along a path in ArcMap ViperPin tool