2 using System.Collections.Generic;
6 List<object> annotations = new List<object> ();
8 public IEnumerable<T> Annotations<T> () where T : class
10 foreach (T o in Annotations (typeof (T)))
14 public IEnumerable<object> Annotations (Type type)
16 if (annotations == null)
18 foreach (object o in annotations)
19 if (o.GetType () == type)
23 public static void Main ()
25 var test = new Test ();
26 test.Annotations<Test> ();