Is there a way in .NET (C#) when using the debugger to know what collections an object is currently in.
I have a situation where class instances are moving in and out of different Lists and Arrays and am trying to track down which collections at any point in time it is currently in. i.e. when i hit a breakpoint.
The only solution I can think of is coding some kind of tracker class. Was hoping the debugger might have a way of tracing this.
Edit: I guess its kind of like the way you can expand a collection in the debugger and see the members, except I'd like to do the reverse.
Thanks.