projects
/
mono.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
* expression.cs (Invocation.IsApplicable): Reorganize slightly to
[mono.git]
/
mcs
/
tests
/
gtest-052.cs
1
// We create an instance of a type parameter which has the new() constraint.
2
using System;
3
4
public class Foo<T>
5
where T : new ()
6
{
7
public T Create ()
8
{
9
return new T ();
10
}
11
}
12
13
class X
14
{
15
public X ()
16
{ }
17
18
void Hello ()
19
{
20
Console.WriteLine ("Hello World");
21
}
22
23
static void Main ()
24
{
25
Foo<X> foo = new Foo<X> ();
26
foo.Create ().Hello ();
27
}
28
}