projects
/
mono.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
2005-02-08 Atsushi Enomoto <atsushi@ximian.com>
[mono.git]
/
mcs
/
tests
/
gen-10.cs
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
static void Main()
36
{
37
}
38
}