I have a relatively large solution that I compile to DLL. I would like to print out or list all the fields in every class in this project.
I'm looking for a Visual Studio feature, Visual Studio add-on, external tool, script, or code snippet (something involving reflection, perhaps?) that will allow me to simply print out all these fields.
Any ideas?
Edit:
Thanks to all the posters. Yuriy's answer was the most helpful, even though I had to massage the code a little bit. It's worth noting that I had to use the BindingFlags enum to make sure I got private fields; using the default gave public or const fields only.
FieldInfo[] fields = type.GetFields(BindingFlags.NonPublic | BindingFlags.Instance);