Alex,
It is recommended that you leave the count in the body of the loop as the JIT compiler looks for this pattern and knows how to optimize it (hoisting).
for (int i = 0; i < this.TreeView1.Nodes.Count; i++)
{
}
If you perform the hoisting yourself you remove this ability away from the optimising compiler.
Regards
Neil