I\'m working on ASP.NET MVC3 with C#. I want to add some delay between each iteration of for loop.
for(int i=0; i<5; i++) { //some code //add dela
You can use something like a one-second delay:
System.Threading.Thread.Sleep (1000);
though make sure this is only for debugging purposes. There's little more annoying than intentionally slowing down software.
Other than an easy way to introduce performance improvements later, of course :-)