I am using Ninject Interception extension to implement SQLLogging.
I have a variable called 'param' and it is an Anonymous type as it showed in Watch window (See the picture below). When I do param.ToString() it returned
{Countries = {System.Collections.Generic.List< int >}
var param = invocation.Request.Arguments[0];
where invoation is of type Ninject.Extensions.Interception.IInvoation Interface.
What I need to get is a name and its items. So, for this one I want something like "Countries = 36, 124, 826, 840".
How do I iterate through the List to achieve that? Also, notice that the name Countries in this case is not known until run-time. It could be something like
{Ages = {System.Collections.Generic.List< int >}
or
{Subjects={System.Collections.Generic.List< string >}

You probably want to write your own visualizer for
List<T>. It will be used for all lists, not only the ones of your anonymous types, but it may still be useful for you.https://msdn.microsoft.com/en-us/library/e2zc529c.aspx