2 using System
.Linq
.Expressions
;
4 public class FooBase { }
5 public class Foo
: FooBase { }
7 public interface IHelper
9 void DoIt (FooBase foo
);
16 Expression
<Action
<IHelper
>> e
= (helper
=> helper
.DoIt (new Foo ()));
17 var mce
= e
.Body
as MethodCallExpression
;
18 var et
= mce
.Arguments
[0].NodeType
;
20 Console
.WriteLine (et
);
21 if (et
!= ExpressionType
.New
)