tags:

views:

156

answers:

4

i want to create a dictionary like:

Dictionary<string,<Dictionary<string, string>>>

Why can't I?

+19  A: 

One too many sets of <>.

What you want is this:

Dictionary<string, Dictionary<string, string>>
Adam Sills
+1 for being the first guy to answer.
rockinthesixstring
wow, on your way to having a "nice answer" in less than 10 minutes.
rockinthesixstring
notice however in the OP's question **title**, he has the syntax correct?
rockinthesixstring
Yep, probably a copy/paste from his code into the question body, but typed the title and simply hadn't seen the mistake in code.
Adam Sills
+2  A: 
Dictionary<string,Dictionary<string, string>>

2nd parameter is not a generic so to speak

PostMan
+2  A: 

Try it like this

Dictionary<string, Dictionary<string, string>>
Matt Greer
+2  A: 
Dictionary<string,Dictionary<string, string>> 
    = new Dictionary<string,Dictionary<string, string>>();
0xA3