How do I add info to a list from a class?
<p>If I have two class like so:</p>

<pre><code>public class Department
{
    public int Id { get; set; }
    public string Name { get; set; }
    public List&lt;Employee&gt; employees { get; set; }
}

public class Employee
{
    public string Name { get; set; }
    public string Job { get; set; }
    public string Date { get; set; }
}
</code></pre>

<p>And then if I do this:</p>

<pre><code>var departments = new List&lt;Department&gt;();
Department d = new Department
{
    Id = 1,
    Name = "Depart1",
 };

Department d2 = new Department
{
    Id = 2,
    Name = "Depart2",
 };

 departments.Add(d);
departments.Add(d2);
</code></pre>

<p>How Can I add to the employees List in the Department class with a foreach loop?  When I do this:</p>

<pre><code>foreach(Department dmt in departments)
{
    Employee worker = new Employee 
    {
        Name = "Steve",
        Job = "Cleanup",
        Date = "Today",
     };

     dmt.employees.Add(worker );
}
</code></pre>

<p>I dont get any build errors but nothing is added.  Any suggestions?</p>
