Add item after every nth step
Loops and Indexes

Why are you using a while loop? A for loop keeps track of indexes for you. Admittedly you do still need to track one index yourself, but you can eliminate one to loop processing:

int addIndex = 0;
for (int i = 0; i &lt; items.Count; i++) {
    output.Add(items[i]);

    if (i % nthStep == 0) {
        output.Add(itemsToAdd[addIndex++]);
    }

    if (i == (items.Count - 1) &amp;&amp; addIndex &lt; (itemsToAdd.Count - 1)) {
        i = 0;
    }
}


In words:


define an index for the items you're adding
loop through the items list, on every pass:


add the current item to the output list
if the current step is the nth step, add the next item to add and increase the index
if we've run out of items but have more left to add, reset the items index so we loop back through



Now you're only tracking and handling one index yourself, instead of the three that your while loop requires.