Essential C# Expression Trees  Suggest an edit

Creating Expression Trees by Using the API

using System.Linq.Expressions;

// Manually build the expression tree for 
// the lambda expression num => num < 5.
ParameterExpression numParam = Expression.Parameter(typeof(int), "num");
ConstantExpression five = Expression.Constant(5, typeof(int));
BinaryExpression numLessThanFive = Expression.LessThan(numParam, five);
Expression<Func<int, bool>> lambda1 =
    Expression.Lambda<Func<int, bool>>(
        numLessThanFive,
        new ParameterExpression[] { numParam });


Table Of Contents
22 Enum
25 GUID
90 Expression Trees
107 Stream
108 Timers
  ↑ ↓ to navigate     ↵ to select     Esc to close