LINQ in Action roller

Binding L-value to a Expr. Tree inside a method

Binding a variable to an Expression Tree seems trivial when generating a Expression Tree but what if I want to bind a free variable to an Expression Tree inside a method? Code Snippet public void BindingFV() { Foo foo = new Foo(); = 5; Expression<Func<Foo>> e = () => foo; = 4; var v1 = e.compile()().id; // v1 = 4 } Is there an equivalant way to write this by building the expression tree your self? If the binding had been to a class variable Expression.MakeMemberAccess Read More...
Published Tuesday, June 19, 2007 3:28 PM by MSDN Forums: LINQ Project General
Anonymous comments are disabled

Featured Item

This Blog