Skip to main content

Posts

Showing posts with the label LINQ

C# Language Extensions to Support LINQ

On the final day of Devweek this year I attended a full-day workshop on LINQ. It was initially billed as a day of “Entity Framework and LINQ”, but annoying the first bit of the title was dropped at some point before the day! Nonetheless it was a good presentation of what LINQ is, what language extension have been developed to support it, and how it is used in LINQ to Objects, LINQ to XML and LINQ to Entities. The talk was given by Niels Berglund. In order to support LINQ, a number of amends and enhancements were made to the .Net compiler and the VB.Net and C# languages – I found it worth getting my head around these, so that the LINQ language introduced later appeared less like “magic”. Automatic Properties Traditionally properties would be created in a class with a public accessor and a private backing store: private string mstrFirstName; public string FirstName { get { return mstrFirstName; } set { mstrFirstName = value; } } At the compiled code level this hasn’t changed, bu...