2 using System
.Linq
.Expressions
;
13 public static int Main ()
15 var expectedObject
= typeof (HasAction
).GetMethod("Start");
17 Expression
<Func
<HasAction
, Action
>> methodToUse
= r
=> r
.Start
;
19 UnaryExpression unary
= methodToUse
.Body
as UnaryExpression
;
20 MethodCallExpression methodCall
= unary
.Operand
as MethodCallExpression
;
21 ConstantExpression constantExpression
= methodCall
.Object
as ConstantExpression
;
23 if (expectedObject
!= constantExpression
.Value
)
26 if (methodCall
.Object
== null)