Click here to Skip to main content
15,892,809 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
hi,

i m I am using a hashtable to keep key value pairs,. in The hashtable as has a value i m I am storing in a structure,. the The structure again contains a List<string> with in within it, so I need to retrive retrieve the structure fields with the hashtable key.

Please let me know how can i I can do this.

Thanks in Aadvance.
Posted
Updated 3-Dec-10 2:25am
v3
Comments
fjdiewornncalwe 3-Dec-10 8:22am    
What have you tried. This smells very much of a homework assignment and you shouldn't be getting an answer from us unless you have displayed to us some level of effort in achieving a solution on your own. Please expand your question with your efforts. Cheers.
#realJSOP 3-Dec-10 8:24am    
My corrections are shown.
Manfred Rudolf Bihy 3-Dec-10 9:02am    
@John: I think I'll consider adapting this style of editing. I think I may have seriously mangled the original of this post in my "translation": http://www.codeproject.com/Questions/133238/Error-Deleting-Folder.aspx .

If I understand your question, you want this:

Arraylist list = new ArrayList();
list.add("test");

Hashtable hash = new Hashtable();
hash.add("ui", list);


list = hash["ui"] as Arraylist
 
Share this answer
 
v2
You can do it with Linq. Google is your friend.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900