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 613683
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T18:01:46+00:00 2026-05-13T18:01:46+00:00

While debugging an ASP.NET application, I want to get a print-out of the entire

  • 0

While debugging an ASP.NET application, I want to get a print-out of the entire state of a very large object. I want all the properties and values in that object and the same for every object-property, recursively.

Because the front-end of the application times out after a significant delay, I can’t add a watch or use the Immediate window or hover over the object, since there won’t be adequite time to fully examine the object.

Is there a way of getting a complete printout of an object in debug mode, or say, a utility or a C# function that would do this?

  • 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-13T18:01:47+00:00Added an answer on May 13, 2026 at 6:01 pm

    You could use reflection to get the list of all properties and fields on the class type, then use that to get the runtime values of each of those properties / values and spit them to the console.

    The PropertyInfo type (here) and FieldInfo type (here) are what you need to get from the Type object for your own class instance.

    MyObject myObject = ... //setup my object
    Type myType = myObject.GetType(); //or Type.GetType(myObject); //I think
    
    PropertyInfo[] properties = myType.GetProperties();
    FieldInfo[] fields = myType.GetFields();
    
    properties[0].GetValue(myObject); //returns the value as an Object, so you may need to cast it afterwards.
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I get this problem very often while debugging a ASP.Net MVC(3) application. I found
While debugging an ASP.Net MVC application running under IIS Express, I get the following
I've been getting an error recently while debugging an ASP.NET application in Visual Studio
How do I display localhost traffic in Fiddler while debugging an ASP.NET application?
I am facing very strange situation. I am developing my ASP.NET application and debugging
While debugging a .NET Framework 3.5, WinForms application I spotted some Worker Threads without
I'm a newbie to Asp.net,learning from the Apress's Begining Asp.net...book.While very curious to see
While debugging ASP.NET MVC source i found MVC-ControllerTypeCache.xml file is used. But i am
Is there a way to enable code coverage while debugging a asp.net site (+assemblies)?
I need to modify source files while debugging my ASP.NET MVC app. I know

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.