This topic could easily be turned into a recurring post. 
Anyway, I have been fortunate enough to have spent this past year working exclusively with Visual Studio 2005 and .NET 2.0. However, like most developers I sometimes have to go back and maintain some of my older code. Whenever I step back into the world of .NET 1.x and Visual Studio 2003 I am immediately struck by how much easier some things are to do in .NET 2.0.
For instance, here is an example of iterating through a simple collection, and then using some contrived logic to locate one of the items. We'll start with the .NET 1.x way first:
// Example 1 - using .NET 1.1: // Build a list of hockey teams.
List hockeyTeams = new List();
hockeyTeams.Add("PIT");
hockeyTeams.Add("NYI");
hockeyTeams.Add("NYR");
hockeyTeams.Add("PHI");
// Note: we will ignore the find method here to demonstrate
// what would be needed for a more complex search of
// a list of objects in .NET 1.1 string bestTeam
// Locate the best team.
foreach (string team in teams)
{
if (team == "NYR")
{
bestTeam = team;
break;
}
}
// Report the results.
Console.WriteLine("best team = " + bestTeam);
I didn't use the Find method above because it isn't extensible in .NET 1.x, so it can't be used in situations where custom logic is required in order to locate one or more members of a collection. With .NET 2.0 that situation has changed. The Find method now accepts a delegate, which makes it easier to apply custom logic for search operations. Notice that in the .NET 2.0 example below I can apply my custom search logic without having to write the code to iterate through the collection. Pretty cool huh?
// Example 2 - using .NET 2.0:
// Build a list of hockey teams.
List hockeyTeams = new List();
hockeyTeams.Add("PIT");
hockeyTeams.Add("NYI");
hockeyTeams.Add("NYR");
hockeyTeams.Add("PHI");
// Locate the best team.
string bestTeam = hockeyTeams.Find(
delegate(string t)
{
return t == "NYR";
}
);
// Report the results.
Console.WriteLine("best team = " + bestTeam);
OK, what's going on here is that .NET 2.0 adds something called functional list processing into the mix. Here is a blog that describes the new features in detail. Anonymous delegates are an important part of the .NET 2.0 framework - I sometimes wonder how I ever got along without them...