How to Dump Objects in C#


It is very useful to be able to visualize your objects or collections at runtime, without having the need to open a particular debugging tool, like the debugger of visual studio.

In this article I explained 3 ways to be able to dump an object at runtime so you can visualize the object values.

Let me know if this article was clear enough to explain this topic, and if you know more ways to dump objects, feel free to share them in your comment.

Article has been ported from

Create your playground on
This playground was created on, our hands-on, knowledge-sharing platform for developers.
Go to