5 [My(typeof(System
.Enum
))]
8 object[] a
= Attribute
.GetCustomAttributes (typeof (T
), false);
11 foreach (object o
in a
) {
13 if (attr
.obj
.GetType () == typeof(long)) {
14 long val
= (long)attr
.obj
;
15 Console
.WriteLine ("got value: {0}", val
);
18 } else if (attr
.obj
.GetType () == typeof(TypeCode
)) {
19 int val
= (int)attr
.obj
;
20 if (val
!= (int)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
) {