Browse by Tags
All Tags »
LINQ »
C#3.0 (
RSS)
Following my last posts ( > )( > ), in this post I’ll introduce the implementation of the SkipLastWhile operator. The SkipLastWhile returns all but the last contiguous elements from a a sequence that satisfy the specified criteria and is implemented...
Following my last post , in this post I’ll introduce the implementation of the SkipLast operator. The SkipLast operator returns all but a specified number of contiguous elements from the end of a sequence and is implemented as the SkipLast extension method...
After having introduced the TakeLast operators ( > )( > )( > ), it makes sense to introduce their duals: the SkipLast operators. Name Description Example SkipLast<TSource>(IEnumerable<TSource>) Returns all but a specified number of...
Following my last posts ( > )( > ), in this post I’ll introduce the implementation of the TakeLastWhile operator. The TakeLastWhile operator returns last contiguous elements from a sequence that satisfy the specified criteria and is implemented...
Following my last post , in this post I’ll introduce the implementation of the TakeLast operator. The TakeLast operator returns a specified number of contiguous elements from the end of a sequence and is implemented as the TakeLast extension method :...
To finalize this series on object hydration, I’ll show some performance comparisons between the different methods of hydrating objects. For the purpose of this exercise, I’ll use this class: class SomeType { public int Id { get ; set ; } public string...
In my previous post I showed how to hydrate objects by creating instances and setting properties in those instances. But, if the intent is to hydrate the objects from data, why not having an expression that does just that? That’s what the member initialization...
Following my last post , I received lots of enquiries about how got to master the creation of expression trees . The answer is: .NET Reflector On that post I needed to to generate an expression tree for this expression: Expression < Func < object...
No. I’m not proposing to get rid of objects. A colleague of mine was asked if I knew a way to dump a list of objects of unknown type into a DataTable with better performance than the way he was using. The objects being dumped usually have over a...