.NET 3.5


.NET Runtime version 2.0.50727.3603 – Fatal Execution Engine Error (7A036050) (80131506) – mscoree.dll

I ran into this problem this morning. When opening a solution within Visual Studio the application would process each of the projects and then exit abruptly. The application simply closed without any error dialog or feedback as to any problem that had occurred. I checked the event log and found the following .NET runtime error in the application log: .NET Runtime version 2.0.50727.3603 - Fatal Execution Engine Error (7A036050) (80131506) Fortunately a quick search on google led me to this page: http://michaelsync.net/2009/10/31/net-runtime-version-2-0-50727-3603-fatal-execution-engine-error-7a036050-80131506-mscoree-dll. Thank you to Michael Sync for the helpful and detailed walkthrough. I installed the updates from the Microsoft site as recommended and...

Dynamic OrderBy in LINQ

Have you ever found yourself writing this code? switch (columnName) {     case "Name":         return objList.OrderBy(o => o.Name);     case "Address":         return objList.OrderBy(o => o.Address);     ... etc ... } If so then you have probably wished you could do this:     return objList.OrderBy(columnName); However, that's not going to work because the LINQ method is looking for an expression tree rather than a column name. There are a few libraries out there such as the Dynamic LINQ Library, but if that feels a little heavyweight for you then the following solution may help. This class is a generic sorter for collections of type T. There are two...

New Array of Anonymous Objects

While coding up a couple of prototype LINQ queries this morning I came across a rather interesting syntax using anonymous types and object initializers.  I wanted to show an example of using a where clause upon a property of an object but didn’t want to put a bunch of plumbing around it just to set up the example.  In my head an array containing three Person objects would suffice, with each person object having Name and Age properties that I could use in my query.  I wasn’t sure if this would compile but dropped it into the wonderful LinqPad and sure enough...

Expressions, Delegates, and Lambdas, Oh My!

C# 3.0 heralded a new era of syntax candy that was introduced in a large part to support LINQ.  The new syntax also brings expanded freedom of expression for developers, however by increasing the number of ways in which similar intentions may be expressed there is additional opportunity for confusion.  In order to alleviate some of this confusion I decided to write about some of these new approaches and provide a reference for understanding how they relate to one another. Anonymous Methods First up on the chopping block are anonymous methods.  Let's look at why these are cool and where you might...