The Items
property itself can never be seen by a debugger, because it is an indexed property, so there isn't a value you can just get for it, and hence examining the value it returns doesn't make sense (like examining the 30th of February or a politician's kept promises; it just doesn't exist).
List<T>
uses the DebuggerTypeProxyAttribute
attribute to define another class to be used to give a debugger eye view. This class (one internal to mscorlib) has a public Items
property that returns an array with a copy of the list's items, so that it looks like you can actually examine the Items
property of List<T>
when really you are examining the Items
property of an object that copies out the items when invoked.
Debuggers don't have to use this approach, so maybe the one you are using doesn't, or there's some other restrictions, but if you are using a debugger that doesn't support DebuggerTypeProxy
you can just examine the private member that stores the items in an array (the array will be at least as large as Count
, and possibly a bit larger to leave growing room rather than resizing on each Add
; you can ignore elements beyond Count - 1
).
This has nothing to do with XML serialisation, so whatever problem you are having with that is likely completely unrelated.
Edit:
I see some people are having other problems with XML serialisation and the SQL CLR as per these:
SQL Server not finding serialization assembly
Your XML problem is indeed different to your debugger view issue. (I meanwhile am off to add debugger proxies to some of my collection types, I've always figured people would just skip through to the inner members and not care, but you've made me rethink that one).