Hey guys, If I've got this data structure in PHP, what data structure is the best for it in C#?
$array = Array( [dummy1] => Array ( [0] => "dffas", [1] => "asdas2", [2] => "asdasda" ), [dummy2] => Array ( [0] => "asdasd", [1] => "sdfsdfs", [2] => "sdfsdf" ) )
And so on. But I need to be able to add data to the nested array on the fly, something like this:
$array["dummy1"][] = "bopnf";
I tried using a Hashtable, but when I go hashtable.add(key,value)
, where key is my dummy1
, and value is one of the array elements, it will throw an error stating that an element already contains that key.
So I'm thinking a hashtable is not the correct way of tackling this.
Thanks, Psy