projects
/
mono.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
* pie.cs: Made the output image little organized and added a
[mono.git]
/
mcs
/
tests
/
test-137.cs
1
//
2
// Explicitly implement all the interface methods pending with the same name.
3
//
4
using System;
5
6
interface A {
7
void X ();
8
}
9
10
interface B {
11
void X ();
12
}
13
14
class C : A, B {
15
int var;
16
17
public void X ()
18
{
19
var++;
20
}
21
22
static int Main ()
23
{
24
C c = new C ();
25
26
A a = c;
27
B b = c;
28
29
if (c.var != 0)
30
return 1;
31
32
a.X ();
33
if (c.var != 1)
34
return 2;
35
b.X ();
36
if (c.var != 2)
37
return 3;
38
c.X ();
39
if (c.var != 3)
40
return 4;
41
42
Console.WriteLine ("Test passes");
43
return 0;
44
}
45
}