Linq support in Compact Framework 3.5

Tonight I did some more browsing through the January 2007 CTP version of Visual Studio “Orcas” and stumbled upon the .NET Compact Framework 3.5. The .NET Compact FX 3.5 is first included in this CTP version. To my great surprise I discovered a System.Core.dll assembly was the one new assembly in the framework.

Cool! Let’s investigate:

So, on a quick look there is support for query operators on IEnumerable<T> implementing types. Support for IQueryable<T> seems to be missing.

The current state includes the 5 Func delegate types plus the interfaces for group operators and ordered sequences. The Sequence class contains all extension methods to the IEnumerable<T> implenting types. In the full .NET FX 3.5 this class has already been renamed to Enumerable. The Sequence and Enumerable class are nearly identical, except that the compact version does not have overloads for Contains, Distinct, Except, GroupJoin, Intersect, Join and Union that have an IEqualityComparer argument. Furthermore, it misses the  SequenceEqual overloads plus one overload for SelectMany.


The signature for the SelectMany overload is:
IEnumerable<TResult> SelectMany<TSource, TCollection, TResult>(Func<TSource, IEnumerable<TCollection>> collectionSelector, Func<TSource, TCollection, TResult> resultSelector);

If you can read that, check Wes Dyer‘s blog entry on anonymous recursion in C#. Pretty heavy stuff, but very nice.


The C# 3.0 and VB 9.0 language compilers will take care of the rest.

Later on I Googled a bit and found that the Compact Framework Team blog mentioned a list of new features.

New Features Included in the Orcas January CTP:
• System.IO.Compression support, including support for HTTP compression.
• Support for a subset of Linq’s Standard Query Operators.
• …

The Compact Framework team also says that:

This release of NETCF does not include the complete list of features but is a step toward the final feature set.  New builds of NETCF will be included in each new public drop of Orcas with the majority of features being included by Orcas Beta1.

There you go. Let’s see what kind of goodness the next CTPs bring us.

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

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

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

Google photo

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

Twitter picture

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

Facebook photo

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

Connecting to %s