LINQ in Action roller

Nested expression trees

I've installed Orcas and began to play with lambdas and expression trees. Is it allowed to use 'nested' exression trees? I mean: Code Snippet using System; using System.Linq; using System.Linq.Expressions; namespace Nikov.Linq { using Expr = Expression<Func<int, int>>; class Program { static void Main() { Expression<Func<int, Expr>> b = (y => (Expr)(x => 2 * x)); } } } Currently, it compiles without any errors, but throws InvalidProgramException when run. Read More...
Published Wednesday, June 13, 2007 3:48 AM by MSDN Forums: LINQ Project General
Anonymous comments are disabled

Featured Item

This Blog