title: C# use Linq method instead of for loop
body: <p>I have a string array and a for loop to add items to list.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>//customers table : 
  // Firstname, Lastname, Age, BrowserName, Date
  
  string[] browsers = {"chrome", "Firefox", "Edge"}
  var users = db.customers.ToList();
  
  list&lt;string&gt; names = new List&lt;string&gt;();
  
  for(var i = 0; i &lt; browsers.lenght; i++) {
       names.Add(users.where(x =&gt; x.BrowserName == browsers[i]).FirstName);
  }    
  </code></pre>
  
  <p>Is there any way to use Linq method or something else instead of <code>for</code> ? </p>