7 public static int operator + (Blah i
, Blah j
)
9 Console
.WriteLine ("Base class binary + operator");
13 public static implicit operator int (Blah i
)
15 Console
.WriteLine ("Blah->int");
19 public static implicit operator byte (Blah i
)
21 Console
.WriteLine ("Blah->byte");
25 public static implicit operator short (Blah i
)
27 Console
.WriteLine ("Blah->short");
33 public class Foo
: Blah
{
35 public static int Main ()
37 int number
= new Foo () + new Foo () ;
38 Console
.WriteLine (number
);
44 Console
.WriteLine ("Convert from Foo to float");
46 Console
.WriteLine ("Converted");
48 // The following will not work till we fix our UserCast::Emit
49 // to convert the return value on the stack.
51 Console
.WriteLine ("Best implicit conversion selected correctly.");
53 Console
.WriteLine ("F is {0}", f
);
55 if (number
== 2 && k
== 3)