Following the advice by one other expert, I tried to change
i++
to
++i
and, to my surprise, found that it works considerably faster (for small footprint in the loop body, of course). Also, some say the '<' condition is faster. I'll also improve naming; one-character names are really bad. So to improve the solution shown my Abhinav (which I credit as correct), do:
for (int index = 0; index < mediationInfo.MediationInfoList.Count; index++) {}
Use the debugger!
Good luck,
—SA