代码
IPoint m_pPoint=new PointClass();
m_pPoint.PutCoords(x,y);
IPoint m_pPoint1=new PointClass();
m_pPoint1.PutCoords(x1,y1);
IPointCollection m_pPointCollection=new PolylineClass();
object Missing=Type.Missing;
m_pPointCollection.AddPoint(m_pPoint,ref Missing,ref Missing);
m_pPointCollection.AddPoint(m_pPoint1,ref Missing,ref Missing);
IPolyline m_pPolyline=m_pPointCollection as IPolyline;