ArcObjects Library Reference  (Geometry)    

IGeometryBridge_AddPoints_Example

[C#]
public void AddPoints()
{
  IPoint point1 = new PointClass();
  point1.PutCoords(10, 10);
  IPoint point2 = new PointClass();
  point2.PutCoords(20, 20);
  IPoint[] pointArray = new IPoint[2];
  pointArray[0] = point1;
  pointArray[1] = point2;
  IPointCollection4 pointCollection = new PolylineClass();
  //add points to pointCollection
  
  IGeometryBridge geometryBridge = new GeometryEnvironmentClass();
  geometryBridge.AddPoints(pointCollection, ref pointArray);
  System.Windows.Forms.MessageBox.Show(pointCollection.PointCount + " points added to PointCollection");
}

[Visual Basic 6.0, Visual Basic .NET, C++]
No example is available for Visual Basic 6.0, Visual Basic .NET, or C++. To view a C# example, click the Language Filter button Language Filter in the upper-left corner of the page.