By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,136 Members | 1,212 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,136 IT Pros & Developers. It's quick & easy.

Creating String Collection

P: n/a
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[i]; }
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!

Nov 15 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
try System.Collections.Specialized.StringCollection

Regards,

Fred
"Haim Turjeman" <be***@bezeqint.net> wrote in message
news:up**************@TK2MSFTNGP10.phx.gbl...
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[i]; }
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!

Nov 15 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.