I really like LINQ, but what if I want to use it and the target framework is not .NET 3.5? There is a way to use LINQ to Objects in .NET 2.0 projects. LINQBridge makes this possible. I saw it today but I didn't try it yet. (I'll be soon)
How it works?
First, it's important to understand that C# 3.0 and Framework 3.5 are designed to work with CLR 2.0-the same CLR version that Framework 2.0 uses. This means that the C# 3.0 compiler emits IL code that runs on the same virtual machine as before.
This makes Framework 3.5 additive-just as Framework 3.0 was additive-comprising additional assemblies that enhance the existing 2.0 Framework and CLR. So there's nothing to stop us from writing our own assemblies that do the work of Framework 3.5 (at least, the critical bits required for local LINQ queries).
Go to LINQBridge official page - you'll find there more info as well as source code.
1 comment:
Thank you very much. This info piece is really appreciated...
Post a Comment