2 using System
.Linq
.Expressions
;
6 public static bool operator > (Foo d1
, Foo d2
)
8 throw new ApplicationException ();
11 public static bool operator < (Foo d1
, Foo d2
)
13 throw new ApplicationException ();
16 public static bool operator == (Foo d1
, Foo d2
)
18 throw new ApplicationException ();
21 public static bool operator != (Foo d1
, Foo d2
)
23 throw new ApplicationException ();
32 Expression
<Func
<bool>> e
= () => f
> null;
33 if (e
.Compile ().Invoke ())
37 if (e
.Compile ().Invoke ())
41 if (e
.Compile ().Invoke ())
45 if (!e
.Compile ().Invoke ())
48 Console
.WriteLine ("OK");