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

4 Comments

  1. Alexey Romanov says:

    Sorry if this being submitted twice… How does it compare to LINQBride (http://www.albahari.com/nutshell/linqbridge.html)?

  2. Roger Alsing says:

    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.

  3. Roger Alsing says:

    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.

Leave a Comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s