Calling a method to draw parallel lines
How would you handle 300 parallel lines?

    Line ParallelLine1 = CameraObject.GetComponent&lt;DrawLines&gt;()
                                     .CreateParallelLine(referenceLine, 50);
    Line ParallelLine2 = CameraObject.GetComponent&lt;DrawLines&gt;()
                                     .CreateParallelLine(referenceLine, -50);
    Line ParallelLine3 = CameraObject.GetComponent&lt;DrawLines&gt;()
                                     .CreateParallelLine(referenceLine, 100);
    Line ParallelLine4 = CameraObject.GetComponent&lt;DrawLines&gt;()
                                     .CreateParallelLine(referenceLine, -100);
    ...
    Line ParallelLine297 = CameraObject.GetComponent&lt;DrawLines&gt;()
                                     .CreateParallelLine(referenceLine, 950);
    Line ParallelLine298 = CameraObject.GetComponent&lt;DrawLines&gt;()
                                     .CreateParallelLine(referenceLine, -950);
    Line ParallelLine299 = CameraObject.GetComponent&lt;DrawLines&gt;()
                                     .CreateParallelLine(referenceLine, 1000);
    Line ParallelLine300 = CameraObject.GetComponent&lt;DrawLines&gt;()
                                     .CreateParallelLine(referenceLine, -1000);


Something's not right isn't it?

I think you need to put words on the concepts involved here:


You have a bunch of lines.
Lines are drawn in pairs.
Lines are offset from the referenceLine by a fixed interval - one line with a positive offset, the other with a negative offset.


You need to write a method that can create n lines and return an IEnumerable&lt;Line&gt; given:


A referenceLine.
An offsetIncrement for the offset.
The n number of pairs of lines you want to create.
A LineParams instance.


And then you can just iterate the result and write the AddNewLine() call only once.