LINQ
It was excellent to see Microsoft refresh the LINQ Tech Preview for VS 2005 RTM. LINQ is cool technology. The only downside today is that fact that we will probably have to wait 1+ years to see it released as part of VS 2006-7.
class Employee
{
public Employee(String name, String location)
{
this.name = name;
this.location = location;
}
public string name;
public string location;
}
List<Employee> employees = new List<Employee>();
employees.Add(new Employee("Fred", "LDN"));
employees.Add(new Employee("Bob", "NY"));
var nys =
from e in employees
where e.location == "NY"
select e;
foreach (var names in nys) {
Console.WriteLine(names.name);
}
Samples from Microsoft are available here