Grouping by using .net 2.0 how do you do it?
<p>Working on a .net 2.0 project and no linq and cannot add any external library.</p>

<p>Build a small example of what I need to do in my real project.</p>

<p>How do you group by eg "Employee.Category" without using linq.</p>

<p>For each group I need to do something about it.</p>

<p>How do you group by in .net 2.0?</p>

<pre><code>     class Program
        {
            static void Main(string[] args)
            {
                List&lt;Employee&gt;employees=new List&lt;Employee&gt;();
                Employee employee = new Employee();
                employee.Id = 1;
                employee.Category = "Management";

                Employee employee2 = new Employee();
                employee.Id = 2;
                employee.Category = "Management";

                Employee employee3 = new Employee();
                employee.Id = 3;
                employee.Category = "Director";

                Employee employee4 = new Employee();
                employee.Id = 4;
                employee.Category = "Worker";

                Employee employee5= new Employee();
                employee.Id = 5;
                employee.Category = "Director";
                Employee employee6 = new Employee();
                employee.Id = 6;
                employee.Category = "Worker";

                employees.AddRange(new Employee[] { employee, employee2, employee3, employee4, employee5, employee6 });

                //1)Group them by category in .net 2.O NO LINQ
                //2)Foreach item in the group do something.

                Console.WriteLine("??");
            }
        }

        public class Employee
        {
            public int Id { get; set; }
            public string Name { get; set; }
            public string Category { get; set; }
        }
</code></pre>

<p>Thanks for any suggestions</p>
