simple ArrayList question

M

MM

How do you reference a Hashtable in an ArrayList?

ArrayList al = new Arraylist();
al.Add(new Hashtable());

now howto add/access hashtable entries?

thanks, matthew.
 
B

Bruce Wood

Hashtable h1 = (Hashtable)al[0];

or

foreach (Hashtable h in al)
{
... do something with the hashtable "h"...
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top