473,395 Members | 1,422 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Dump variable contents similar to PHP var_dump() or print_r() function?

Is there a .NET class or function to dump the contents of a
variable/array/object/whatever to the console?

Console.WriteLine( dump_variable( my_var ) );

Thanks.
Nov 17 '05 #1
1 10647

"ChuckDemon" <ch*****@pertrain.com.au> wrote in message
news:e2**************@TK2MSFTNGP12.phx.gbl...
Is there a .NET class or function to dump the contents of a
variable/array/object/whatever to the console?


No, not to my knowledge, other than ToString(), which probably isn't what
you want.

You could write something like that pretty easily using reflection
Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Dave | last post by:
Problem: When I try to print a variable in the Immediate Window (ie "? mststSwitch"), the immediate window indicates that it is nothing. But, if I put a "MsgBox(mststSwitch)" at the same...
3
by: Art X | last post by:
The reason for this has do to with the nature of WebTV and will be directed to WebTV users with a conditional so that it will have no effect on PC users. I'm trying to create a function that...
10
by: Clay_Culver | last post by:
I have heard that it is possible to use classes + template magic to make standalone functions (or maybe just a functor which acts like a function) which can accept variable length arguments without...
3
by: junk | last post by:
Hi, Given the following function:- void foo (char *fmt, ...) { } I know how to use va_start, va_end etc to process the parameters but is there an easy way of passing the parameter list...
8
by: Michael | last post by:
Hi, I think my problem deals with class casting and inheritance. I want to deal with various Audio Formats, reading into memory for modification, working with it (done by different classes),...
3
by: carvalho.miguel | last post by:
hello, imagine you have a static class method that receives a function pointer, an int with the number of arguments and a variable number of arguments. in that static method you want to call...
0
by: mfilpot | last post by:
I am working on a prime number generator for sschool, but I jsut can't seem to figure out how to write the contents of the variable MeSSage into a new text file, Can someone help me? the script...
1
by: Bitslong | last post by:
Hi, I'm trying to use what is held in a variable to get to an object property: img_lib.sections is an array containing a varying number of strings - eg "Category1","Category2" etc ...
1
by: coppersaucepipe | last post by:
<xsl:call-template name="Blanks"> <xsl:with-param name="NumPop" select="$NoOfBloggs"/> <xsl:with-param name="Required" select="10"/> <xsl:with-param name="FileName" select="'fred.xml'"/>...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.