Ah damn, then the method is not aviable in RH5, sorry.
According to this old thread SweepTwoRail Class should work in RH5, but it misses the inputs for start and end points so maybe the loft way is a proper workaround for RH5.
https://developer.rhino3d.com/api/RhinoCommon/html/T_Rhino_Geometry_SweepTwoRail.htm