[Solved] Performance: While-loop


I would suggest neither, rather I would suggest this

List<int> data = Enumerable.Range(0, 10000000).ToList();
int j = -1;



// Method 1   

while (++j < data.Count)
{
    // do something
}

int j = 0;
do
    {
        //anything
    } while (++j<data.count);

pre-increment operation is faster than post, although a small performance advantage

3

solved Performance: While-loop