Welcome to mirror list, hosted at ThFree Co, Russian Federation.

test-219.cs « tests « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 90112f5c33576b326f29a9d6a55b71f77ff4b737 (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
using System;

public class TestAttribute : Attribute {
    Type type;

    public TestAttribute(Type type)
    {
        this.type = type;
    }

    public Type Type
    {
        get { return type; }
    }
}

[TestAttribute(typeof(void))]
public class Test {
    public static void Main()
    {
        object[] attrs =
            typeof(Test).GetCustomAttributes(typeof(TestAttribute), false);
        foreach (TestAttribute attr in attrs) {
            Console.WriteLine("TestAttribute({0})", attr.Type);
        }
    }
}