* Mono.Cairo/Cairo.cs (cairo_set_target_drawable): Not available anymore, removed.
[mono.git] / mcs / tests / test-157.cs
1 using System;
2 using System.Reflection;
3
4 namespace Test {
5         
6         //[AttributeUsage (AttributeTargets.All)]
7         public class MyAttribute: Attribute {
8                 public string val;
9                 public MyAttribute (string stuff) {
10                         System.Console.WriteLine (stuff);
11                         val = stuff;
12                 }
13         }
14         
15         [My("testclass")]
16         public class Test {
17                 static public int Main() {
18                         System.Reflection.MemberInfo info = typeof (Test);
19                         object[] attributes = info.GetCustomAttributes (false);
20                         for (int i = 0; i < attributes.Length; i ++) {
21                                 System.Console.WriteLine(attributes[i]);
22                         }
23                         if (attributes.Length != 1)
24                                 return 1;
25                         MyAttribute attr = (MyAttribute) attributes [0];
26                         if (attr.val != "testclass")
27                                 return 2;
28                         return 0;
29                 }
30         }
31 }