title: How to add items into the list from other list using for each C# smart technique
body: <p>Can I add list data from other list items using for each loop without extracting the method?
  I want to add a new list to <code>PersDriver</code>.</p>
  <p>Here is the code where <code>PersDriver</code> is a list of Test class and <code>AutoDrivers</code> is a list passing from the model. But I am getting an error at the end of the new PersDriver() {} that ; expected.
  Can anyone correct my simple code without extracting a new method or add it to the list?</p>
  <pre><code>Test t1 = new Test(testModel model)
  {
     PersDriver = new List&lt;PersDriver&gt;() 
     {
         model.AutoDrivers.ForEach(_driver =&gt;
         {
             new PersDriver()
             {
                 Id= _driver.Id,
                 Name = _driver.Name
             }
         }
     }
  }
  </code></pre>