repo.or.cz
/
mono-project.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
[build] Fix warning (#4177)
[mono-project.git]
/
mcs
/
tests
/
gtest-010.cs
blob
178f81fc0d3f35d5ec167d79a410db51a0a11ef4
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
public static void
Main
()
36
{
37
}
38
}