I am trying to see the properties of an object with over 300 properties in the Immediate Window of Visual Studio 2005. Only the first 100 items are displayed, followed by this caption:
< More... (The first 100 of 306 items were displayed.) >
I am trying to see the rest of the items, but can't figure it out.
I realize that I could see these in a Watch window, but that's not the same.
Print is used to show the value of a variable instantly in the immediate window.
The differences between the Command and Immediate windowsThe Command window can load dlls or packages into the IDE as well. The Immediate window, on the other hand, is solely used during debugging and is useful to execute statements, print values of a contextual variable, or even evaluate expressions.
Sometimes its useful to see the list in the immediate window rather than looking in the watch window. You can easily see more results than the first 100 by using:
yourList.Skip(100).ToArray()
Which really doesn't take long to write and works well - was useful for me.
Update: As pointed out in the comments below, this answer is actually wrong and applicable ONLY to collections and NOT to objects with lots of properties. I'm leaving it here as lots of people seem to have found it useful.
If you add your object to the watch window, then expand the properties so that all are displayed. Then Ctrl+A and Copy. You can then paste in excel to get an organized list of properties and their values.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With