Linq to objects for .NET 2 available
Patrik Löwendahl blogged about using C#3 features in .NET 2 via VS.NET 2008 a few days ago:
http://www.lowendahl.net/showShout.aspx?id=191
There are quite a few of the new features that works straight out of the box.
However, Linq does not, alot of the code that Linq uses is simply not present in the .NET 2 BCL.
So, inspired by Patriks post I opened up an old custom Linq engine that I wrote a while back and spiced it up and adapted it for .NET 2.
I also added a few of the standard list extensions such as “Take” “Skip” etc.
The code can be found here:
www.puzzleframework.com/Roger/LinqForNet2.zip
And before you get all excited, this is only Linq to objects, NOT Linq to SQL….
The code supports the following Linq constructs, features and list extensions:
-
from (ok ok, I didn’t have to code anything for that)
-
where
-
join
-
groupby
-
orderby
-
select
-
Take
-
Skip
-
TakeWhile
-
SkipWhile
-
Distinct
-
Deferred execution
Enjoy : – )
//Roger
Design by
Very well done!
Anders Hesselbom
March 31, 2008 at 6:56 pm
Sorry if this being submitted twice… How does it compare to LINQBride (http://www.albahari.com/nutshell/linqbridge.html)?
Alexey Romanov
March 31, 2008 at 10:08 pm
Oh, I didnt know about the other project.
My guess is that LinqBridge is far more complete since it seems to be a serious project.
While mine was pretty much a clean up of my old blog sample.
I havent checked yet, but thats my guess atleast.
Roger Alsing
April 1, 2008 at 4:48 am
Yeah I just checked it out and they got pretty much a full implementation of the in mem engine.
all the list extensions etc.
So if you need Linq to Objects for 2.0 that would be the way to go.
Roger Alsing
April 1, 2008 at 4:58 am