![]() |
This document is archived and information here might be outdated. Recommended version. |
| ArcObjects namespaces > Geometry > ESRI.ArcGIS.Geometry > Interfaces > IG > IGeometryCollection Interface > IGeometryCollection.Geometry Property (ArcObjects .NET 10.4 SDK) |
A reference to the ith geometry.
[Visual Basic .NET] Public Function get_Geometry ( _ ByVal Index As Integer _ ) As IGeometry
[C#] public IGeometry get_Geometry ( int Index );
[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
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.
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 |