Iterate through the ChildList instead of the Children property of a parent item in a “for” loop

Vasiliy Fomichev

In Posted

C# will evaluate the item.Children statement with each loop; prevent this by creating a ChildList and iterate through it instead.