using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Linq.Expressions;
public class MainClass{
public static void Main(string[] args){
Expression<Func<String, bool>> MyLambdaExpression = MyString => MyString.Length > 3;
ParameterExpression Parameters = (ParameterExpression)MyLambdaExpression.Parameters[0];
BinaryExpression TheEvaluation = (BinaryExpression)MyLambdaExpression.Body;
MemberExpression LeftSide = (MemberExpression)TheEvaluation.Left;
ConstantExpression RightSide = (ConstantExpression)TheEvaluation.Right;
Console.WriteLine(Parameters.ToString() + "\r\nEvaluation: " +
TheEvaluation.ToString() + "\r\nLeft Side: " +
LeftSide.ToString() + "\r\nRight Side: " +
RightSide.ToString());
}
}
|