blob: d3cb8f612d823615f22dbc4afd999257794c1f9d (
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
29
30
31
32
33
34
35
36
37
|
using System;
using System.Reflection;
using System.Runtime.InteropServices;
[Test2]
public partial class Test
{ }
[AttributeUsage(AttributeTargets.Struct)]
public partial class TestAttribute: Attribute
{
}
[AttributeUsage(AttributeTargets.All)]
public partial class Test2Attribute: Attribute
{
}
[TestAttribute]
public struct Test_2 {
}
class X
{
static int Main ()
{
if (Attribute.GetCustomAttributes (typeof (Test)).Length != 1)
return 1;
if (Attribute.GetCustomAttributes (typeof (Test_2)).Length != 1)
return 1;
Console.WriteLine ("OK");
return 0;
}
}
|