display of anonymous delegates

display of anonymous delegates

Hi Grant,

if I execute the following sample method:

        public static void Foo()
     {
            IDictionary<int, int> dict = new Dictionary<int, int>();
            dict.Add(1, 1);
            dict.Add(2, 2);

            List<int> itemsToRemove = new List<int>();
            itemsToRemove.Add(1);

            itemsToRemove.ForEach(delegate(int id)
            {
                dict.Remove(id);
            });
     }

then I see in the tree view of NCoverExplorer two "strange" entries. One is named just "<>" and has a child "<Foo>b__0". Looking at the line number this is exactly my anonymous delegate.

For me this is a little bit strange, since seeing this in the tree view does not give any hint what it shall be.
Possibly NCover gets exactly this information from the ICorProfiler API.

In general shall be anonymous method display as own methods or are they just part of any other method?

I would expect to display this kind of method in a different manner. E.g. use a different icon and/or a special subtree to show that this methods are special.
 
Ciao
Thomas