5 [My(typeof(System.Enum))]
8 object[] a = Attribute.GetCustomAttributes (typeof (T), true);
11 foreach (object o in a) {
13 if (attr.obj.GetType () == typeof(int)) {
14 int val = (int)attr.obj;
15 Console.WriteLine ("got value: {0}", val);
18 } else if (attr.obj.GetType () == typeof(System.TypeCode)) {
19 TypeCode val = (TypeCode)attr.obj;
20 if (val != TypeCode.Empty)
23 Type t = attr.obj as Type;
26 if (t != typeof (System.Enum))
35 [AttributeUsage(AttributeTargets.All,AllowMultiple=true)]
36 class My : Attribute {
38 public My (object o) {