473,395 Members | 1,720 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Hashtable & Values

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
Nov 16 '05 #1
3 2102
> 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];

--
cody

Freeware Tools, Games and Humour
http://www.deutronium.de.vu || http://www.deutronium.tk
Nov 16 '05 #2
Hi codymanix

thanks so far. There are so much trees in the wood :-)

Juergen
Nov 16 '05 #3
Hi codymanix

thanks so far. There are so much trees in the wood :-)

Juergen
Nov 16 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Ricardo Pereira | last post by:
Hi, I wrote a simple program to test the "out-of-the-box" functionalities of the CMAB (Configuration Management Application Block). After having added 2 values to an hashtable, and having written...
10
by: Brian | last post by:
I'm reasonably new to C#, and using a class containing a hashtable collection to feed a treeview. My problem is that I can't pull the data from the hashtable! Here's the code I have: if...
3
by: A. Burch | last post by:
I'm wanting to use a Hashtable. I have 2 (keys, objectvalues) pairs of data to store. I'm using a static declartion for the Hashtable the instance of the class that is the object. If I try and...
3
by: Frank | last post by:
Hi! I'm kinda stuck here. I have an Hashtable with with my custom "Item" Object. The key used in the Hashtable is the "Item.Id", i have selected this key because with a lot of functions i can...
8
by: SenthilVel | last post by:
how to get the corresponding values for a given Key in hashtable ??
16
by: Sreekanth | last post by:
Hello, Is there any better collection than HashTable in terms of performance, when the type of the key is integer? Regards, Sreekanth.
1
by: Ryan Liu | last post by:
Hashtable.GetEnumerator is not thread safe, but what about I write I loop go though Hashtable.Values, is that thread saft? Thanks a lot!
1
by: Alexander Widera | last post by:
hello, how can I convert a hashtable to an arraylist or array? I want to sort the hashtable... but this isn't posible, so i have to convert it to an hashtable. thank you, alex
8
by: Robin Tucker | last post by:
When I create a hashtable hashing on Object-->Item, can I mix "string" and "integer" as the key types? I have a single thumbnail cache for a database with (hashed on key) and a file view (hashed...
3
by: NagarajanS | last post by:
Hi, i need one help in HashTable. see the below example /* * HashTableTest.java * * Created on October 20, 2007, 12:48 PM * * To change this template, choose Tools | Template Manager *...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.