title: How to replace for-loops with a functional statement in C#?
body: <p>A colleague once said that God is killing a kitten every time I write a for-loop.</p>
  
  <p>When asked how to avoid for-loops, his answer was to use a functional language. However, if you are stuck with a non-functional language, say C#, what techniques are there to avoid for-loops or to get rid of them by refactoring? With lambda expressions and LINQ perhaps? If so, how?</p>
  
  <p><strong>Questions</strong></p>
  
  <p>So the question boils down to:</p>
  
  <ol>
  <li>Why are for-loops bad? Or, in what context are for-loops to avoid and why?</li>
  <li>Can you provide C# code examples of how it looks before, i.e. with a loop, and afterwards without a loop?</li>
  </ol>