I love debugger visualizers. For the most part, they work great. But debugger visualizers aren't much help when trying to examine arrays of objects or non-generic collections. In the example below,
In this particular instance, I wanted to see the names, types and values for each item in the command1.Parameters collection. Similarly, the Locals window didn't help either.
Here is where the Immediate Window comes to the rescue. I can get the value I want my using the following syntax:
? command1.Parameters("@sqlPopulate").Value
The question mark at the beginning tells the Immediate Window to output the results, as in the following example which will get the name and value of parameter 2:
? command1.Parameters(2).Value
5 {Integer}
Integer: 5 {Integer}
? command1.Parameters(2).ParameterName
"@PageSize"
The beauty, as you can see, is that I can use full .NET syntax to work with the objects in scope at the current point of execution, and you get IntelliSense to boot.
Have fun!