blob: cab90047bc905e1a0cdcaa38c2a480024a131b41 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
interface IA
{
}
interface IB
{
int Foo ();
int Foo2 ();
}
interface IC : IA, IB
{
}
class C1 : IA, IB
{
public int Foo ()
{
return 5;
}
public int Foo2 ()
{
return 55;
}
}
class C2 : C1, IC
{
public new int Foo ()
{
return 2;
}
public int Foo2 ()
{
return 2;
}
public static int Main ()
{
IC ic = new C2 ();
if (ic.Foo () != 2)
return 1;
if (ic.Foo2 () != 2)
return 2;
return 0;
}
}
|