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

Expression Tree Tutorial - Knowledge Base (KB)

656 results

How do I call a method using a LINQ expression?

I've been playing around with the ...DLR... a bit and am a bit stuck on calling methods. For example, suppose I want to make an expression to push something onto a stack:...class StackInfo{ protected Stack<SomeClass> _stack; public Expression P...
c# dynamic-language-runtime expression-trees linq
asked by Jason Baker

How to make your own system. In C#, what are Linq.Expression classes?

Is it possible to create custom Expression classes? If so, does anyone have any examples? Inheriting from the framework abstract Expression class poses a problem in that its constructor takes an ExpressionType parameter, which is a framework enum type - I...
c# expression-trees
asked by MalcomTucker

In C#, I'm having trouble using BinaryExpression.

I want to implement...Expression<Func<int, int, int>> Max = (p1,p2) => p1 > p2 ? p1:p2; ...as an expression tree and tried...ParameterExpression LeftEx = Expression.Parameter(typeof(int), "p1"); ParameterExpression RightEx = Expression.Parameter(typeof(in...
c# expression-trees
asked by Pemo12

How do linq expression trees acquire the value of a parameter?

AddOptional<tblObject>(x =>x.Title, objectToSend.SupplementaryData); private static void AddOptional<TType>(Expression<Func<TType,string>> expr, Dictionary<string, string> dictionary) { string propertyName; string propertyValue; Expression e...
c# expression-trees lambda linq
asked by Tadeusz Wójcik

C# assistance with parsing my own expression tree

I have the following code. I constructed an expression tree and I am stuck parsing it to find the result ...You will find the details within my code...public enum OpertaionType { add, sub, div, mul} public class Node { public Node(Node lhs, Node rhs...
c# expression-trees parsing
asked by mustafabar

Conversion from Lambda to Expression Tree

I will keep it really simple,...How do I get expression tree out of lambda??...or from query expression ?
c# expression-trees lambda
asked by Prashant Cholachagudda

Compiled LINQ-to-SQL Query Issue (works as uncompiled query)

I have C# extension methods on ...IQueryable..., e.g. ...FindNewCustomers()... and ...FindCustomersRegisteredAfter(int year)... and so forth which I use to "chain" a query together for LINQ to SQL....Now to my problem: I want to create compiled queries, e...
c# compiled-query expression-trees linq linq-to-sql
asked by Alex

In a LINQ expression tree, how do you evaluate a solitary boolean expression?

I'm using the standard visitor pattern to iterate through a LINQ expression tree in order to generate dynamic SQL WHERE clauses....My issue is that unlike C#, you can't use a standalone boolean expression in SQL; you have to compare it to either 1 or 0...
c# expression-trees lambda linq
asked by Nathan Ridley

C# lambda expression switch

Is it possible to have a switch in a lambda expression? If not, why? Resharper displays it as an error.
c# expression-trees lambda switch-statement
asked by Toto

Query filter expression tree parser

I am looking for a parser that can operate on a query filter. However, I'm not quite sure of the terminology so it's proving hard work. I hope that someone can help me. I've read about 'Recursive descent parsers' but I wonder if these are for full-blown l...
c# expression-trees parsing tsql
asked by Lee Atkinson

Expression Trees in Java

Is there an equivalent of ....net...'s Expression Trees that underly LINQ for the ...JVM...? I would like to implement some LINQ like code structures in ...Scala... and I am wondering if I have to roll my own expression tree library also....Update: I am n...
expression-trees java jvm linq scala
asked by Steve Severance

Is it possible to produce Python bytecode programmatically?

I want to hack around with the Python interpreter and try creating a small DSL . Is there any module where I can do something like this theoretical code (similar to LINQ expression trees)? ...expression_tree = Function( Print( String('Hello ...
abstract-syntax-tree bytecode dsl expression-trees python
asked by Jason Baker

What is a decent use case for Expression Trees in.net 4.0?

This one was inspired by my language-guru co-worker who can't seem to find a good use for them, and after a few lame attempts of my own, I'd have to agree. ...Now I know these concepts tend to flow a lot more easily once you get some good practical reason...
.net expression-trees linq
asked by KevinDeus

Expression Tree with iQueryable

Can anybody explain me how to use (1) iQueryable (2) Expression Tree in C# by providing a very basic example? Both are not correlated, instead of making two separate questions, I wish to clear my doubt in a single question....Advanced Thanks.
c# expression-trees iqueryable lambda
asked by user184805

When creating binary lambda expressions, the lambda parameter is not in scope.

When creating a lambda expression by hand I get a 'Parameter not in scope' exception. ...Any ideas as to what I am doing wrong?... public class OtherType { public string First_Name { get; set; } public string Last_Name { get; set; } ...
c# expression-trees lambda
asked by TonyAbell

I'm curious in the Expression Tree in.NET.

I have read several articles and several ...stackoverflow.com... posts about expression tree. It is beating my brain to understand....Questions:... 1) Like DOM (Document Object Model), it is an in-memory representation of logic?...2) Somebody explained it...
c# expression expression-trees
asked by user192142

How can I get the object from a MemberExpression?

So, lets say I have the following expression in C#:...Expression<Func<string>> expr = () => foo.Bar; ...How do I pull out a reference to foo?
c# expression-trees lambda
asked by Brian Genisio

Polynomial evaluation techniques that have been developed

I'm trying to come up with an elegant way to handle some generated polynomials. Here's the situation we'll focus on (exclusively) for this question:...order... is a parameter in generating an ...n...th order polynomial, where n:=order + 1....i... is an in...
algebra c# expression-trees linq math
asked by Sam Harwell

With LINQPad, how can I display an expression tree?

Maybe I'm missing something obvious, but I how can I view the expression tree for this query:...from word in "The quick brown fox jumps over the lazy dog".Split() orderby word.Length select word ...using ...LINQPad...?
expression-trees linqpad
asked by GuyBehindtheGuy

To read the name and value of a property, use an expression tree. Is there another option?

Assumptions...Suppose I have a class with a property:...class ClassWithProperty { public string Prop { get; private set; } public ClassWithProperty(string prop) { this.Prop = prop; } } ...And now suppose I have created an instance...
c# expression-trees
asked by Theo Lenndorff

Page 3 of 33
  • «
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • …
  • »
  • »»

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!