Add two polylines

Im trying to simply add two polylines.
Is there are simple command to do this rather than my long-winded? way as below.

building.gh (3.0 KB)

Polyline R = new Polyline(); // Big Polyline.
R = AddPolyLines(P1, P2);

A = R;

}

//
Polyline AddPolyLines(Polyline a, Polyline b)
{
List L = new List(); //Total list of point’s
Point3d X1 = new Point3d[3]; // An array of 3 points for 1st line.
Point3d X2 = new Point3d[3]; // An array of 3 points for 2nd line.
Point3d X = new Point3d[6]; // An array to hold all 6 points
X1 = a.ToArray(); // Get the 1st polyline’s points.
X2 = b.ToArray(); // Get the 2nd polyline’s points.

L.AddRange(X1); // Use AddRange cause adding a collection of stuff?
L.AddRange(X2);

Polyline P = new Polyline(L); // Polyline takes a LIST.

return P; // The joined polyline.

}
// </Custom additional code>
}

Since polyline is a collection of points with some methods you can do this:

P1.AddRange(P2);

P1 is first polyline P2 is the second.

wow

thanks again