2010-06-17 Geoff Norton <gnorton@novell.com>
[mono.git] / mono / tests / iface7.cs
blob664f137d12b27d50b4616db205790da3b8fcd235
1 using System;
3 namespace TestMono
5 public interface IBase {
6 int Do();
9 public interface IDerived : IBase {
12 public class Base : IBase {
13 int IBase.Do() {
14 return 1 + Do();
16 public virtual int Do() {
17 return 1;
21 public class Derived : Base, IDerived {
24 class Class1
26 static int Main(string[] args)
28 IDerived id = new Derived();
29 if (id.Do() != 2)
30 return 1;
31 IBase ib = (IBase) id;
32 if (ib.Do() != 2)
33 return 2;
34 Derived d = (Derived) id;
35 if (d.Do() != 1)
36 return 3;
37 Base b = (Base) id;
38 if (b.Do() != 1)
39 return 4;
40 return 0;