As the title points out, this will cause an infinite loop, and will eat up all of your memory. What happens is that we iterate through the list once (i=0; list.Count = 3) and then add an element to the list. So the next loop we have (i=1; list.Count = 4). This is because anything in the parenthesis of the for operator will be evaluated every loop.

“If at first you don’t succeed, then you will have alerted them to your presence. It is important that you at first succeed.” – @NightValeRadio

Weekly Newsletter

Get weekly insights around the latest in agility and organizational change delivered right to your inbox!

About

Cory provides organizational and technical coaching, consulting and training that helps complex companies greatly improve the speed to market of quality products. His unique approach creates a customized framework with the capability of transforming the entire lifecycle of products from ideation through continuous delivery. Interested in having him help your organization? Contact him today at foyc at cory foy dot com! You can also find him on: