473,387 Members | 1,495 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,387 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 2101
> 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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.