Extract Mesh edges

hello to all,
I need to extract all mesh edges.
I’m doing this:

    List<Curve> lstCurves = new List<Curve>();
                int edgesCount = m.TopologyEdges.Count;
                for(int i = 0; i < edgesCount; i++)  {
                    lstCurves.Add(m.TopologyEdges.EdgeLine(i).ToNurbsCurve());
                }

What should be the less consuming way to do it?
thanks in advance.
Carlos

Yep, that’s how to do it. You could be a bit more efficient by not converting the lines to NURBS curves. Rhino has a line curve object.

var line_curves = new List<LineCurve>();
for (var i = 0; i < mesh.TopologyEdges.Count; i++)
  line_curves.Add(new LineCurve(mesh.TopologyEdges.EdgeLine(i)));

thanks a lot Dale,
kind regards
C.