I have been trying to figure this out, but couldn't. On php a multidimensional array would looks like this:
$array = array(
1 => array("height" => 10, "width" => 20, "length" => 30),
2 => array("height" => 10, "width" => 20, "length" => 30),
3 => array("height" => 10, "width" => 20, "length" => 30),
);
And them I would get the value using
echo $array[3]["height"]; // output 10
echo $array[3]["width"]; // output 20
I have tried to use Dictionary, but I have no idea on how to accomplish this. Any help is appreciated Thanks
EDIT: This is the code I used that worked for me, hope this helps someone.
Dictionary<int, Dictionary<string, int>> array = new Dictionary<int, Dictionary<string, int>>();
Dictionary<string, int> sub = new Dictionary<string, int>();
sub.Add("height", 10);
sub.Add("width", 20);
sub.Add("length", 30);
array.Add(1, sub);
sub = new Dictionary<string, int>();
sub.Add("height", 10);
sub.Add("width", 20);
sub.Add("length", 30);
array.Add(2, sub);
sub = new Dictionary<string, int>();
sub.Add("height", 10);
sub.Add("width", 20);
sub.Add("length", 30);
array.Add(3, sub);
Response.Write("height: " + array[1]["height"]);
Response.Write("<br />width: " + array[1]["width"]);
Response.Write("<br />length: " + array[1]["length"]);