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

  • Thread starter Thread starter ChuckDemon
  • Start date Start date
C

ChuckDemon

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.
 
ChuckDemon said:
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
 
Back
Top