Does the c# compiler optimizes Count properties?

Viewed 928
List<int> list = ...

for(int i = 0; i < list.Count; ++i)
{
           ...
}

So does the compiler know the list.Count does not have to be called each iteration?

7 Answers
Related