Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gtest-025.cs « tests « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 3ec8745220acd6ef3c83b39ad2434f0785efe0f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
class Foo
{
	public Foo ()
	{ }

	public void Hello<T> (T t)
	{
		// We're boxing the type parameter `T' to an object here.
		Whatever (t);
	}

	public void Whatever (object o)
	{
		System.Console.WriteLine (o.GetType ());
	}
}

class X
{
	static void Test (Foo foo)
	{
		foo.Hello<int> (531);
	}

	public static void Main ()
	{
		Foo foo = new Foo ();
		Test (foo);
	}
}