title: Traditional loop versus Action delegate in .NET
body: <p>After learning about the <a href="http://msdn.microsoft.com/en-us/library/018hxwa8.aspx" rel="nofollow noreferrer">Action</a> delegate in C# I've been looking for ways I can best use it in my code. I came up with this pattern:</p>
  
  <pre><code>Action&lt;string&gt; DoSomething = (lSomething) =&gt;
  {
      // Do something
  };
  
  DoSomething("somebody");
  DoSomething("someone");
  DoSomething("somewhere");
  </code></pre>
  
  <p>If I were to have used a traditional loop, it would look something like this:</p>
  
  <pre><code>List&lt;string&gt; lSomeList = new List&lt;string&gt;();
  lSomeList.Add("somebody");
  lSomeList.Add("someone");
  lSomeList.Add("somewhere");
  
  foreach (string lSomething in lSomeList)
  {
      // Do something
  }
  </code></pre>
  
  <p>Are there any appreciable differences between the two? To me they look equally easy to understand and maintain, but are there some other criteria I might use to distinguish when one might be preferred over the other?</p>