1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
interface IFoo : Object { public virtual void foo (int i) { assert (i == 42); } } class Bar : Object, IFoo { public new string foo () { return "bar"; } } void main () { var bar = new Bar (); assert (bar.foo () == "bar"); ((IFoo) bar).foo (42); }