views:

58

answers:

1

LINQ to objects has the incredibly useful Union, Intersect, and Except methods. Sadly, there's a client I'm doing work for and they are mandating .NET 2.0 so LINQ is not an option. I looked through the reflected code and it didn't reverse well at all.

Is there a .NET 2.0 library or easy implementation of Union, Intersect, and Except?

+7  A: 

Any reason not to use LINQBridge? Get your LINQ to Objects goodness while still targeting .NET 2.0 :)

Jon Skeet
+1 - I was just going to suggest that... ;)
Lucero
These still seem to be extension methods. Will I need to write another layer to turn them into non-extensions or is that already built in also?
Dinah
You can use VS2008 and the C# 3 compiler, which handles all the extension methods just fine, and still target the 2.0 runtime. But even so you wouldn't need to actually write another layer, those are just plain static methods decorated with some attribute to make the compiler magic work.
Lucero