zzz projects Expression Tree Tutorial
Getting Started Documentation Knowledge Base
  • Getting Started
  • Documentation
  • Knowledge Base

Expression Tree Tutorial - Knowledge Base (KB)

7 results in tag: .net-4.0

How to make a dynamic ExpressionFunc, dynamic>> - Is it a flaw?

During my work with expression trees for a few days now, I came across something that I find difficult to understand; hopefully someone will be able so shed some light here....If you code ...Expression<Func<dynamic, dynamic>> expr1 = x => 2 * x;... the co...
.net-4.0 c# dynamic expression-trees lambda
asked by d..

.NET 4.0 Expression Trees: Expression The method "get Item" in type ListT> cannot be found.

I'm stuck with the problem below and wondering is someone out there will be able to help. I have added comments to the code to make it self-explanatory but let me know if you need more info or if the problem is unclear....Thanks a lot in advance!...Edit: ...
.net-4.0 c# expression-trees lambda
asked by d..

What is the Linq expression tree for changing an object's property?

Suppose I have:...class Foo { public int Bar { get; set; } } public void SetThree( Foo x ) { Action<Foo, int> fnSet = (xx, val) => { xx.Bar = val; }; fnSet(x, 3); } ...How can I rewrite the definition of fnSet using an expression trees, e.g.:...
.net-4.0 c# expression-trees linq
asked by Eric

Misunderstanding about compiled expression trees?

I have this expression : ...Expression<Func<string, bool>> f = s => s.Length < 5; ...ParameterExpression p = Expression.Parameter (typeof (string), "s"); MemberExpression stringLength = Expression.Property (p, "Length"); ConstantExpression five = Expressi...
.net-4.0 c# expression-trees
asked by Royi Namir

Is it possible to have an out ParameterExpression?

I want to define a Lambda Expression with an ...out... parameter. Is it possible to do it? ...Below are code snippets from a C# .Net 4.0 console app that I tried....As you can see in Procedure25 I can use lambda expressions to define a delegate that has a...
.net .net-4.0 c# expression-trees linq
asked by costa

Change expression delegate body at runtime?

I have this code which produce a delegate which multiply myNumber by 5...ParameterExpression numParam = Expression.Parameter(typeof(int), "num"); ConstantExpression five = Expression.Constant(5, typeof(int)); BinaryExpression numMultiply = Expression.Mult...
.net .net-4.0 c# expression-trees
asked by Royi Namir

Building Expression Tree for string.Contains

I'm struggling to build an expression tree so I can dynamically do filtering on some data....I have come up with this, but it fails at the ...var lambda =... line...foreach (var rule in request.Where.Rules) { var parameterExpression = Expression.Param...
.net-4.0 c# expression-trees
asked by CaffGeek

Page 1 of 1
  • 1

Prime Library

Performance

  • Entity Framework Extensions
  • Entity Framework Classic
  • Bulk Operations
  • Dapper Plus

Expression Evaluator

  • C# Eval Expression
  • SQL Eval Function
More Projects...
Get monthly updates by subscribing to our newsletter!
SUBSCRIBE!