Finding a type's instance data in .net heap
问题 Let's say I have two class Foo and Bar as follows public class Foo { private Bar _bar; private string _whatever = "whatever"; public Foo() { _bar = new Bar(); } public Bar TheBar { get { return _bar; } } } public class Bar { public string Name { get; set; } } I have an application that attaches to a process that is using these classes. I would like to see all instances of Foo type in .NET heap and inspect the TheBar.Name property or _whatever field of all Foo instances present in .NET heap. I