ArcObjects Library Reference (Geometry)  

IGeometryBridge.AddGeometries Method

Adds references to the specified geometries.

[Visual Basic .NET]
Public Sub AddGeometries ( _
    ByVal pGeometryCollection As IGeometryCollection, _
    ByRef newGeometries As IGeometry[] _
)
[C#]
public void AddGeometries (
    IGeometryCollection pGeometryCollection,
    ref IGeometry[] newGeometries
);
[C++]
HRESULT AddGeometries(
  IGeometryCollection* pGeometryCollection,
  Array* newGeometries
);
[C++]

Parameters

pGeometryCollection [in]

  pGeometryCollection is a parameter of type IGeometryCollection

newGeometries [in]   newGeometries is a parameter of type Array

Product Availability

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

Description

All development languages compatible version of IGeometryCollection::AddGeometries .

[C#]

    public void AddGeometries()
    {
        IPoint point1 = new PointClass();
        point1.PutCoords(10, 10);

        IPoint point2 = new PointClass();
        point2.PutCoords(20, 20);

        IGeometry[] geometryArray = new IGeometry[2];
        geometryArray[0] = point1 as IGeometry;
        geometryArray[1] = point2 as IGeometry;

        //add geometries
        IGeometryCollection geometryCollection = new MultipointClass();
        IGeometryBridge geometryBridge = new GeometryEnvironmentClass();
        geometryBridge.AddGeometries(geometryCollection, ref geometryArray);
    }

See Also

IGeometryBridge Interface