projects
/
mono.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
* corlib.build: remove AppDomain.cs from the corlib_res.dll.
[mono.git]
/
mcs
/
tests
/
test-30.cs
1
//
2
// Tests whether we implement the correct methods from interfaces
3
//
4
5
using System;
6
7
interface IA {
8
void Draw ();
9
}
10
11
interface IB {
12
void Draw ();
13
}
14
15
class X : IA, IB {
16
public bool ia_called;
17
public bool ib_called;
18
19
void IA.Draw ()
20
{
21
ia_called = true;
22
}
23
24
void IB.Draw ()
25
{
26
ib_called = true;
27
}
28
}
29
30
class test {
31
32
static int Main ()
33
{
34
X x = new X ();
35
36
((IA) x).Draw ();
37
Console.WriteLine ("IA: " + x.ia_called);
38
Console.WriteLine ("IB: " + x.ib_called);
39
40
if (x.ib_called)
41
return 1;
42
if (x.ia_called)
43
return 0;
44
45
return 1;
46
}
47
}
48
49