Linq

These are completely undocumented.

LINQ to Objects:

Specialized enumerable:

The new implementation recognizes queries that apply Where and/or Select to arrays or List<T> and fold pipelines of multiple enumerable objects into single specialized enumerables.

According to Dinesh Kulkari at Microsoft this enhancement:

….produces substantial improvement in base overhead of common LINQ to Objects queries (at times 30+%).

Cast<T> breaking change

This is a bug fix and a breaking change.  Note: this post

Cast<T> was not correctly behaving in all scenarios do it was silently fixed for SP1. This does break you code in some situations!

If you’ve been using Cast<T> for example to perform generic collection type conversions well that was not so good. Here are the two assumptions that we used to get away with not following:

  • The elements in the object based collections need some additional step (specifically an un-box or a reference conversion)
  • The starting point is only non-generic types (think ICollection, IEnumerable, etc) you call Cast<T> on.

So although the fix is a breaking one, it does move Cast<T> to expected and specified behavior (as it worked in beta 2).

Indeed if this breaks your code your code was already silently broken (another possible reason for the silence).

Expect more InvalidCastExceptions (if you start to wonder why).

kick it on DotNetKicks.com

Adapted from Dinesh.Kulkarni

Digg This

One Comment

  1. I`m interested there`s a lot of articles on casino gambling. There are dissimilar methods, tactics, strategies, algorithms of counting, calculations and so on.
    But these items are only heap of ads and i don`t want to analyze them `cause i don`t have any basic knowledge. It`s useless. Estimation i think will be wrong.
    Is there anyone here who is attracted in such topic?
    I`d appreciate someone`s explaining to me is there any systems or strategies, what are they (what approaches or concepts lay in basis) and in which casinos could they be applied to?
    Thanx a lot.


5 Trackbacks/Pingbacks

  1. [...] Undocumented Linq! .NET 3.5 SP1 Gold Forgot to Mention these Critical Changes that might Break your … [...]

  2. [...] Undocumented Linq! .NET 3.5 SP1 Gold Forgot to Mention these Critical Changes that might Break your … [...]

  3. [...] Undocumented Linq! .NET 3.5 SP1 Gold Forgot to Mention these Critical Changes that might Break your … [...]

  4. [...] Undocumented Linq! .NET 3.5 SP1 Gold Forgot to Mention these Critical Changes that might Break your … [...]

  5. [...] Undocumented Linq! .NET 3.5 SP1 Gold Forgot to Mention these Critical Changes that might Break your … [...]

Post a Comment