blob: 379b5dddca8e42806c23a441a5714fdd754aabc6 (
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
|
using System;
using System.Reflection;
[AttributeUsage (AttributeTargets.All)]
public class DocAttribute : Attribute
{
public DocAttribute () {}
public DocAttribute (string s) {}
}
public delegate void Func<[Doc] TArg, [Doc ("ret!")] TRet> ();
class Test
{
public static int Main ()
{
Type[] targs = typeof (Func<,>).GetGenericArguments ();
if (targs[0].GetCustomAttributes (false).Length != 1)
return 1;
if (targs[1].GetCustomAttributes (false).Length != 1)
return 2;
Console.WriteLine ("OK");
return 0;
}
}
|