Examples
This section provides practical examples demonstrating how to use Dumpify in various scenarios.

Example Categories
Basic Usage
Get started with simple examples covering the fundamentals:
- Dumping primitive types
- Dumping objects and classes
- Dumping collections and arrays
- Using labels for identification
- Basic formatting options
Advanced Usage
Explore more sophisticated scenarios:
- Custom configuration per-dump
- Color customization
- Table styling and formatting
- Member filtering and selection
- Custom type handlers
- Handling circular references
- Nested object structures
Real-World Scenarios
See how Dumpify fits into actual development workflows:
- Debugging API responses
- Inspecting Entity Framework entities
- Logging and diagnostics
- Unit test debugging
- Console application development
Quick Examples
Simple Object Dump
var person = new Person
{
Name = "John",
Age = 30
};
person.Dump();
Collection with Label
var numbers = new[] { 1, 2, 3, 4, 5 };
numbers.Dump("My Numbers");
Configured Dump
var data = GetComplexData();
data.Dump(
maxDepth: 3,
tableConfig: new TableConfig { ShowTableHeaders = false },
colors: new ColorConfig { PropertyValueColor = "#00FFFF" }
);
Multiple Output Targets
// Console output
result.DumpConsole();
// Debug output (Visual Studio Output window)
result.DumpDebug();
// Get as string
var text = result.DumpText();
Running the Examples
All examples assume you have:
- Installed the Dumpify NuGet package:
dotnet add package Dumpify - Added the using directive:
using Dumpify;
See Also
- Getting Started - Initial setup guide
- Configuration - All configuration options
- API Reference - Complete method documentation
- Features - Feature deep-dives