repo.or.cz
/
mcs.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
In class/Microsoft.Build.Tasks:
[mcs.git]
/
tests
/
gtest-050.cs
blob
641ac26429370313a3b5acf98170a8cb7edabff6
1
// Type inference when creating delegates
2
3
using
System
;
4
5
delegate int
D
(
string
s
,
int
i
);
6
7
delegate int
E
();
8
9
class
X
10
{
11
public static
T F
<
T
> (
string
s
,
T t
)
12
{
13
return
t
;
14
}
15
16
public static
T G
<
T
> ()
17
{
18
throw new
ArgumentException
();
19
}
20
21
static void
Main
()
22
{
23
D d1
=
new
D
(
F
<
int
>);
24
D d2
=
new
D
(
F
);
25
26
E e1
=
new
E
(
G
<
int
>);
27
}
28
}