Hashtable & Values

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

i'm just new to C# and probably my question is stupid. But nevertheless...
I'v created a hastable with a key (unique number) and an array xyz (let's say it's a record) with 8 values inside. I fill up the hash with ...add(key,array)
Creation and filling the hash works fine and within the debugger i can see the correct values within the array
But what's to do for reading out the value of e.g. key=1 and the value within the array at position[4] belonging to that key

Thank's a lot for hel
 
Creation and filling the hash works fine and within the debugger i can see
the correct values within the array.
But what's to do for reading out the value of e.g. key=1 and the value
within the array at position[4] belonging to that key?

int[] array = (int[])myHashtable[myKey];
int value = array[4];
 
Back
Top