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

  • Home
  • SEARCH
  • 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 9168793
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T15:42:51+00:00 2026-06-17T15:42:51+00:00

PHP has a function called print_r() and var_dump() that will display all the contents

  • 0

PHP has a function called print_r() and var_dump() that will display all the contents of an item. It makes it very easy to figure out what things are.

Is there something like that in C#?

I know there is a Console.WriteLine("Hello"); in C#, but does this work in the MVC? Can I do some type of debug.trace() like flash does into a debug console while I run the application?

  • 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-06-17T15:42:55+00:00Added an answer on June 17, 2026 at 3:42 pm
    System.Diagnostics.Debug.WriteLine("blah");
    

    and in order to show all variables in the object you would have to override its ToString() method or write a method which returns all the info you need from the object.
    i.e.

    class Blah{
    
        string mol = "The meaning of life is";
        int a = 42;    
    
        public override string ToString()
        {
             return String.Format("{0} {1}", mol, a);
        }
    }
    
    System.Diagnostics.Debug.WriteLine(new Blah().ToString());
    

    In short there is nothing in built but it can be done.

    If you must print ALL the objects info without overriding or adding logic on a class by class level then you are in the realms of reflection to iterate the objects PropertInfo array

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

Sidebar

Related Questions

I have written a PHP function to take a video embed code that has
PHP has a function called extract() which takes an associative array as the argument
PHP has a is_readable function which checks to see if the file is readable
PHP has PHP-FPM, a pool of PHP processes that run, are managed, go away
Php has a method escapeshellcmd() that escapes any characters in a string that might
My defs.php has a define that I need, and although I used require_once for
This has me stumped. I can print_r the array called $item_pages and it outputs
I have some PHP code that was at one point WORKING FINE. It makes
I am planning on working on a game that has a PHP back-end to
After adding this to the end of my display function inside app/controllers/pages_controller.php , //

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.