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
remove NotWorking
[mcs.git]
/
tests
/
gtest-024.cs
blob
af7f93f37c5712f9d84feb38443f3fd14f955e98
1
class
Foo
<
T
>
2
{
3
public
Foo
()
4
{ }
5
6
public void
Hello
(
T t
)
7
{
8
// We're boxing the type parameter `T' to an object here.
9
Whatever
(
t
);
10
}
11
12
public void
Whatever
(
object
o
)
13
{
14
System
.
Console
.
WriteLine
(
o
.
GetType
());
15
}
16
}
17
18
class
X
19
{
20
static void
Test
(
Foo
<
int
>
foo
)
21
{
22
foo
.
Hello
(
4
);
23
}
24
25
static void
Main
()
26
{
27
Foo
<
int
>
foo
=
new
Foo
<
int
> ();
28
Test
(
foo
);
29
}
30
}