title: Using C# LINQ to concat a filtered List<object> to List<string>
body: <p>This is probably easy for someone more experienced with LINQ and the Lambda expressions in C#. I'm just starting out with them, so I must be missing something.</p>
  
  <p>I have a custom object like this:</p>
  
  <pre><code>public class BusinessName {
      public string Name { get; set; }
      public string Type { get; set; }
  }
  </code></pre>
  
  <p>Then, I have a list of these objects:</p>
  
  <pre><code>List&lt;BusinessName&gt; businessNames = new List&lt;BusinessName&gt;();
  </code></pre>
  
  <p>I want to convert this into a list of <code>string</code> with the <code>Name</code> property of the <code>BusinessName</code> object:</p>
  
  <pre><code>List&lt;string&gt; names = new List&lt;string&gt;();
  </code></pre>
  
  <p>Obviously, I could do this:</p>
  
  <pre><code>foreach (BusinessName name in businessNames) {
      names.Add(name.Name);
  }
  </code></pre>
  
  <p>But, I want to try using the lambda expressions with LINQ so that I can put this into a one liner.</p>
  
  <p>So, I tried:</p>
  
  <pre><code>names.AddRange(businessNames.Select(item =&gt; item.Name));
  </code></pre>
  
  <p>This works as expected, but is much slower than the foreach loop by 2x. I suspect this is because it's iterating the list twice, unlike the foreach loop.</p>
  
  <p>So, I started looking for an alternative. I found <code>Concat()</code> but couldn't figure out how it was any different than <code>AddRange()</code>.</p>
  
  <p>Does anyone know a way to do this in one pass with LINQ?</p>