I am a c# beginner (but quite familiar with JavaScript), and I am learning by debugging example code. I have a question now regarding the "immediate window".
I set a breakpoint at
(... nested object sent via JSON from some external javascript code ...)
var json_serializer = new JavaScriptSerializer();
var value_list = (IDictionary<string, object>)json_serializer.DeserializeObject(value);
Then evaluated the following in the immediate window
value_list
Count = 4
[0]: {[type, msg]}
[1]: {[settings, System.Collections.Generic.Dictionary`2[System.String,System.Object]]}
[2]: {[hello, edge]}
[3]: {[txt, notepad.exe]}
value_list["txt"]
"notepad.exe"
value_list["settings"]
Count = 2
[0]: {[host, test.com]}
[1]: {[port, 80]}
So far so good.
Then I tried
value_list["settings"]["host"]
But only got "error CS0021: Cannot apply indexing with [] to an expression of type 'object'".
How can I print the value of host in the immediate window?