Creating String Collection

H

Haim Turjeman

i want to create a dynamic collection of strings.
the way i know to do this is with ArrayList

class stringCol
{
ArrayList string = new ArrayList();

public string this[int i]
{ get{ return (string)strings; }
set...
}
...
}
(this is only an example of the code)

i want to avoid the casting part!!
how do i do it?
maybe IList / ICollection , i don't know.

it will be very helpfull if you refer me to a good source on the subject
or explain it yourself

thanx ahead!
 

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