For reasons that are beyond the scope of this question, I have a PowerShell script that I have to convert to C#. At one point it queries a database and pipes the result to Format-Table.
Here is the implementation of the Format-Table cmdlet, but the way the whole thing is written seems to require knowledge of PowerShell internals to make sense of.
Is there any existing system that can take an IDataReader and produce similar textual output?