Powershell has pretty pretty modular modules for displaying objects, arrays, collections, dictionaries and tabular data.
Since Powershell is all .NET, I assume there is an assembly containing the logic for this.
Who can think of a way to call these powershell created from .NET:
I would suggest something like this:
Console.WriteLine(Powershell.DisplayObject(obj))
source
share