ArcObjects Library Reference  (Geometry)    

IGeometryCollection.Geometry Property

A reference to the ith geometry.

[Visual Basic 6.0]
Property Geometry(
    ByVal Index As Long _
) As IGeometry
[Visual Basic .NET]
Public Function get_Geometry ( _
    ByVal Index As Integer _
) As IGeometry
[C#]
public IGeometry get_Geometry (
    int Index
);
[Java]
public  getGeometry (
    Long Index,
    IGeometry outPart
)
[C++]
HRESULT get_Geometry(
  long Index,
  IGeometry** outPart
);
[C++]

Parameters

Index

  Index is a parameter of type long

outPart [out, retval]

  outPart is a parameter of type IGeometry

Product Availability

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

Description

Returns the ith Geometry from the GeometryCollection.  The first Geometry has index 0 and the last Geometry has index equal to GeometryCount - 1.  The last Geometry can also be referenced using index -1.

Remarks

Note: The GeometryType returned by the Geometry method depends on which object type points the IGeometryCollection pointer.

IGeometryCollection Object GeometryType Returned Object GeometryType
Polygon
Rings
Polyline
Paths
Multipoint
Points
Multipatch
TriangleFans or TriangleStrips or Rings
TriangleFan
Points
TriangleStrip
Points
Geometry Bag
Any type of IGeometry

See Also

IGeometryCollection Interface

Example

IGeometryCollection_Example