Creating a leader object

In the example, “Creating a leader”, the following line of code causes the following compiler error. Can anyone tell me what reference I might be missing?

if (points2d.Count < 1 || point2d.DistanceTo(points2d.Last<Point2d>()) > RhinoMath.SqrtEpsilon)

Error 2 ‘System.Collections.Generic.List<Rhino.Geometry.Point2d>’ does not contain a definition for ‘Last’ and no extension method ‘Last’ accepting a first argument of type ‘System.Collections.Generic.List<Rhino.Geometry.Point2d>’ could be found (are you missing a using directive or an assembly reference?)

Try adding this namespace

using System.Linq;

Thx, Menno. That did it.