LINQ

LINQ — Lambda Expression vs Query Expression

As you’re prob­a­bly aware of already, LINQ comes in two flavours – using Lamb­da expres­sions and using SQL-like query expres­sions: Both yields the same result because query expres­sions are trans­lat­ed into their lamb­da expres­sions before they’re com­piled. So per­­for­­mance-wise, there’s no dif­fer­ence what­so­ev­er between the two. Which one you should use is most­ly per­son­al pref­er­ence, …

LINQ — Lamb­da Expres­sion vs Query Expres­sionRead More »

Functional programming with Linq — IEnumerable.Aggregate

As I was learn­ing func­tion­al pro­gram­ming with F# I came across the List.reduce func­tion which iter­ates through a list and builds up an accu­mu­la­tor val­ue by run­ning anoth­er func­tion against each ele­ment in the list. Back to the more famil­iar C# ter­ri­to­ry, LINQ has intro­duced some func­tion­al fea­tures to C# and one of these is …

Func­tion­al pro­gram­ming with Linq — IEnu­mer­able.Aggre­gateRead More »

Controlling Type conversion in C#

Ever run into a sit­u­a­tion where your appli­ca­tion needs to use a type for its inter­nal work­ing but occa­sion­al­ly need to con­vert that type into anoth­er just so it can be passed to anoth­er appli­ca­tion which doesn’t under­stand some of the base types we have in the .Net space? Con­sid­er the exam­ple below, where the …

Con­trol­ling Type con­ver­sion in C#Read More »

LINQ — choosing between Concat() and Union()

In Linq To Objects, there are two ways you can join two sequences togeth­er, using either Con­cat() or Union(), and as I was won­der­ing how the two dif­fers I came across this post: http://weblogs.asp.net/fbouma/archive/2009/03/04/choose-concat-over-union-if-possible.aspx The main thing to take away from this arti­cle is: “If you care about the dupli­cates, Union() is nec­es­sary. How­ev­er, in …

LINQ — choos­ing between Con­cat() and Union()Read More »

Under the cover of i4o

I did some per­for­mance opti­miza­tion work a lit­tle while back, and one of the changes which yield­ed a sig­nif­i­cant result was when I migrat­ed some serv­er side com­po­nents (which are CPU inten­sive and per­forms a large num­ber of loops) from using ADO.NET DataSets to using POCOs (plain old CLR object). The loop­ing was then done …

Under the cov­er of i4oRead More »

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close