projects
/
mono.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Wed Oct 17 13:24:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
[mono.git]
/
mcs
/
tests
/
gtest-025.cs
1
class Foo
2
{
3
public Foo ()
4
{ }
5
6
public void Hello<T> (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 foo)
21
{
22
foo.Hello<int> (531);
23
}
24
25
static void Main ()
26
{
27
Foo foo = new Foo ();
28
Test (foo);
29
}
30
}