Very simple question: how can I solve for the self-intersection of a polyline with RhinoCommon?

In the attached, I am creating a polyline from a set of points, so it must (as far as I know) be explicitly cast as a polyline and not a curve. Solving for the intersection event with Rhino.Geometry.Intersect.Intersection.CurveSelf returns “Error (CS1503): Argument 1: cannot convert from ‘Rhino.Geometry.Polyline’ to ‘Rhino.Geometry.Curve’”

I’ve found solutions on the forum using RhinoScriptSyntax, but none with RhinoCommon.

PolylineSelfIntersect.gh (5.1 KB)