Ad
  • Custom User Avatar

    C# offer a rich language with a rich toolbox, it's a shame to not use them. If not, please provide a real 'ultimate' solution.

    So I will give a little review on why I consider it is not a Best practice nor a Clever solution :

    • usage of 'foreach' loop with an array is not good for perf (nor so much compatible with others langages)
    • why curIndex start with -1 and it is incremented before it's first use. Initialize it with 0, this is the REAL current position and post-increment it (in on sentence or after assignation)