projects
/
mono.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
use new GetOriginalType method
[mono.git]
/
mcs
/
tests
/
gtest-051.cs
1
using System;
2
3
public class Foo<T>
4
where T : A
5
{
6
public void Test (T t)
7
{
8
Console.WriteLine (t);
9
Console.WriteLine (t.GetType ());
10
t.Hello ();
11
}
12
}
13
14
public class A
15
{
16
public void Hello ()
17
{
18
Console.WriteLine ("Hello World");
19
}
20
}
21
22
public class B : A
23
{
24
}
25
26
class X
27
{
28
static void Main ()
29
{
30
Foo<B> foo = new Foo<B> ();
31
foo.Test (new B ());
32
}
33
}