I am starting to do a little development in C#, and I am stuck with a problem here. Usually I develop in Python where stuff like this is being implemented easily (at least f
You can easily do this:
Dictionary> dict =
new Dictionary>() {
{"alfred",new Dictionary() {{"age",20.0},{"height":180.1}}},
{"barbara",new Dictionary() {{"age",18.5},{"height": 167.3}}}
};
You would be better off using typed person though, or an ExpandoObject to give typed syntax access to the dictionary.
Dictionary dict = new Dictionary() {
{"alfred",new Person { age=20.0 ,height=180.1 }},
{"barbara",new Person { age=18.5,height=167.3 }}
};