repo.or.cz
/
mcs.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
2010-02-19 Rodrigo Kumpera <rkumpera@novell.com>
[mcs.git]
/
tests
/
gtest-010.cs
blob
26b88153a5153eac5eaade8e69331921f2462e66
1
// Type parameters with constraints: check whether we can invoke
2
// things on the constrained type.
3
4
using
System
;
5
6
interface
I
7
{
8
void
Hello
();
9
}
10
11
class
J
12
{
13
public void
Foo
()
14
{
15
Console
.
WriteLine
(
"Foo!"
);
16
}
17
}
18
19
class
Stack
<
T
>
20
where T
:
J
,
I
21
{
22
public void
Test
(
T t
)
23
{
24
t
.
Hello
();
25
t
.
Foo
();
26
}
27
}
28
29
class
Test
30
{
31
}
32
33
class
X
34
{
35
static void
Main
()
36
{
37
}
38
}