Browse by Tags
All Tags »
C# 3.0 (
RSS)
Note for purists: This post only speaks for “LINQ predicates”, not – although closely related to - the mathematic concept of a predicate as defined by Weisstein, Eric W. "Predicate." From MathWorld --A Wolfram Web Resource. http://mathworld...
As a reference for some planned and unplanned future posts, I wanted to share out my “cheat sheet” for the C# 3.0 translation carried out for query expressions. Obviously it’s based on the C# 3.0 Language Specification more specially section 7.15.2. A...
Last time we talked about dealing with dynamic code generation using Reflection.Emit to generate calls to our dynamic binder. I’ve shown how to see the IL that gets generated by means of the Dynamic IL Visualizer add-in in Visual Studio. In this post...
Last time in this series we were able to compile a stunningly complex “dynamic lambda” x => x – also known as I in the world of combinators – into IL code at runtime. As that’s not particularly useful, we want to move on to slightly more complex expressions...
Welcome back to the dynamic expression tree fun. Last time we designed our simplified expression tree class library we’ll be using to enable dynamic treatment of objects. Today, we’ll take this one step further by emitting IL code that resolves the operations...
In the previous post, I outlined the use of the expression trees from the System.Linq.Expressions namespace. Let’s recap to set the scene: Expression < Func < string , int , int , string >> data = ( string s, int a, int b) => s.Substring...
By now, most – if not all – readers of my blog will be familiar with this C# 3.0 and VB 9.0 feature called Local Variable Type Inference or Implicitly Typed Local Variables. The idea is simple: since the compiler knows (and hence can infer) type information...
Everyone knows array initializers; they’ve been part of the language since the very beginning. But do you know how this innocent looking construct really works? var ints = new [] { 1, 2, 3 }; Before we continue, I should point out that the above sample...
While preparing for another one of my posts, soon to be published, I received the following: What can one do when observing such a message? Since watching a grown man cry is both a pathetic and embarrassing situation, downloading the language specification...
Recently I delivered a talk at TechEd South Africa on “Custom LINQ Providers”. This is a very broad topic to cover in barely 60 minutes especially if one has to explain pretty “abstract” pieces of art like IQueryable<T>. Apparently I managed to...
More Posts
Next page »