Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5932495
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T14:50:31+00:00 2026-05-22T14:50:31+00:00

I work with a lot of Linq queries in my code, and I’m looking

  • 0

I work with a lot of Linq queries in my code, and I’m looking for a library that provides a formatted Dump() function similar to what LinqPad offers. LinqPad’s Dump() extension method is really quite nice, because it handles nested collections very well.

Ideally, it would print out pretty tables in plain text, but I’d be ok with spitting out HTML or other nicely formatted data.

The ObjectDumper sample from VS does not cut it at all.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T14:50:31+00:00Added an answer on May 22, 2026 at 2:50 pm

    This is what I’ve been using:

    Special thanks to this thread (especially Pat Kujawa’s & anunay’s comments)

    C# (Straight from Pat Kujawa’s comment (though I made it return itself so that it chains like linqpad’s version does)):

    public static T Dump<T>(this T o) {
        var localUrl = Path.GetTempFileName() + ".html";
        using (var writer = LINQPad.Util.CreateXhtmlWriter(true))
        {
            writer.Write(o);
            File.WriteAllText(localUrl, writer.ToString());
        }
        Process.Start(localUrl);
        return o;
    }
    

    VB (my conversion since I needed it in a VB app):

    Public Module LinqDebugging
        <System.Runtime.CompilerServices.Extension()>
        Public Function Dump(Of T)(ByVal o As T) As T
            Dim localUrl = Path.GetTempFileName() + ".html"
            Using writer = LINQPad.Util.CreateXhtmlWriter(True)
                writer.Write(o)
                File.WriteAllText(localUrl, writer.ToString())
            End Using
            Process.Start(localUrl)
            Return o
        End Function
    End Module
    

    You will need to add the linqpad executable as a reference in your project as well as System.IO and System.Diagnostics

    This launches your default web browser showing the exact output that linqpad would generate.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have a program that uses Linq-To-Sql and does a lot of similar queries
I have an MVC app that does a lot of work with jQuery ajax
I used to work in JavaScript a lot and one thing that really bothered
We've been doing a lot of work with LINQ lately, mainly in a LINQ-to-Objects
I'm refactoring code that was written some time ago when linq and delegates didn't
We work with a lot of real estate, and while rearchitecting how the data
I do a lot of work with temperatures in Textmate and I'd love to
I've been doing a lot of work with tuples and lists of tuples recently
My work is running SQL Server 2008 and I spend a lot of time
Having a lot of trouble getting texture maps to work in openGL ES (iphone).

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.