score:15
in c# 3, expression trees can represent expressions. hence the name. and they are further restricted to a subset of c# expressions -- no assignment expressions, no expressions involving pointer types, and so on.
in the libraries that will ship with c# 4, we have extended the expression tree library to also support statement trees. however, c# 4 will not automatically translate a statement-lambda into a "statement tree".
that is an obvious and useful feature which we simply did not have time to get to for c# 4. we'll consider it for hypothetical future versions. if you have a really great user scenario for statement trees, i'd love to hear it.
the obvious further extension to all that is declaration trees, which would represent class declarations, struct declarations, and so on. having total homoiconicity between the c# language and the expression tree library would be awesome. it would enable all kinds of interesting metaprogramming scenarios. but that will not happen any time soon, so do not get your hopes up. that's more of a long-term dream of mine which might never happen.
score:1
expression trees:
http://www.interact-sw.co.uk/iangblog/2005/09/30/expressiontrees
http://www.davidhayden.com/blog/dave/archive/2006/12/18/expressiontrees.aspx
http://msdn.microsoft.com/en-us/library/bb397951.aspx
http://community.bartdesmet.net/blogs/bart/archive/2006/11/22/getting-started-with-c_2300_-3.0-expression-trees.aspx
http://blah.winsmarts.com/2006/05/23/demystifying-c-30--part-7-expression-trees.aspx
visitor pattern:
http://www.dofactory.com/patterns/patternvisitor.aspx
http://en.wikipedia.org/wiki/visitor_pattern
Source: stackoverflow.com
Related Query
- What is the max LINQ Expression Trees can do?
- How can I get LINQ to return the object which has the max value for a given property?
- What is the Efficiency and Performance of LINQ and Lambda Expression in .Net?
- The LINQ expression could not be translated. Either rewrite the query in a form that can be translated, or switch to client evaluation EF Core 3.1
- What is the equivalent of XML PATH and Stuff in Linq lambda expression (GROUP_CONCAT/STRING_AGG)?
- The LINQ expression could not be translated. Either rewrite the query in a form that can be translated, or switch to client evaluation
- How can I get LINQ to return the index of the object which has the max value in a collection?
- What is the Maximum Number of Records i can insert through InserAllOnSubmit() In Linq to Sql
- what is the Linq expression tree for setting a property of an object?
- Linq expression to find the max value of a List<List<int>>?
- How can I write the following code more elegantly using LINQ query syntax?
- The LINQ expression could not be translated. Eiither rewrite the query in a form that can be translated
- Can LINQ expression classes implement the observer pattern instead of deferred execution?
- What is the recommended practice for sharing similar linq to entities expression logic in different repositories
- What is the proper Linq expression for this left-outer-join query?
- What can be the code for someIEnumerable.Select extension method?
- What is the equivalent LINQ to SQL query expression of this SQL statement?
- How can I check the number of calls to the database in LINQ query when using .NET Core and Code First?
- NHibernate Linq with subquery returns 'Only one expression can be specified in the select list when the subquery is not introduced with EXISTS'
- Can I use a LINQ IEnumerable result as the data source for a Gtk.TreeView?
- How can I do a LINQ query joining two entities and select what a Where on one of the entities?
- System.InvalidOperationException: 'The LINQ expression could not be translated. Either rewrite the query in a form that can be translated
- The LINQ expression 'Expression' could not be translated. Either rewrite the query in a form that can be translated
- Can I Use The Same Linq Code to Query for Different Conditions?
- What SQL query or LINQ code would get the following data?
- What is the best way to find length of split characters from the given string by using String.Split() Method or Linq Lambda Expression in C#
- c# can I type the code I want to execute in LINQ expressions
- In a LINQ with a select can I compare forward to the next row and decide what to select?
- How can I create a LINQ expression that joins four tables and allows a where on the topmost table?
- What is the correct syntax for using an expression in a Linq query?
More Query from same tag
- Can you include more than just one relationship level using lambdas in linq to entities
- C# Combining 2 lists of different types using Linq [Method syntax]
- LINQ search List<string[]>; if [0] matches then return [1]
- Linq Select Clause w/ Unknown Number of Fields
- Random Linq Query
- How to get row with bigger index using linq
- How can I concatenate all the column values in a row, and then concatenate all rows in a DataTable into a single string?
- Linq methods not available for a collection implementing IEnumerable
- Is there any way to delay- execute a delegate against an IQueryable<T> after/during execution?
- EXECUTE sp_executesql @SQL Linq returns VOID
- c# use query result as index in table
- Sort results based on occurrences
- Speed difference between Linq to XML and Excel with a OledbConnection?
- Comparing dates when date my be null
- Populate List<string> with the same value with LINQ
- LINQ Method Syntax with INNER and OUTER Join
- LINQ NotSupportedOperation exception with Code First
- How to remove an item in a list that contains specific string
- LINQ DateTime Aggregation with GroupBy and Group By
- Can I have an incrementing count variable in LINQ?
- Linq Expression to create instance of Type with optional args?
- Group By Query giving error when i sum up a selected field
- C# LINQ - Find object in list between two properties
- c# linq to sql join problem
- Unable to Cast() generic dictionary item to DictionaryEntry when enumerated via non-generic IDictionary
- LINQ - Where a string contains any element in an array
- .SelectMany() and getting data from more than one related table
- Custom Method in LINQ Query
- If condition check in linq
- Can someone explain Query Reshaping in Linq with the following example?