Kimmo Laine <reply.to@newsgroup> wrote:
i need two list that can be dynamically increased - one to store integers
and the other to store custom objects. I currently use ArrayList and it
works fine... Is there other choices? Is there a "IntList" or something -
when storing integers, ArrayList feels a little "heavy" to do this simple
task?
ArrayList will work, but will end up boxing each int, causing more
memory usage and a bit of extra CPU work. How large is the int list
going to be? Unless it's got thousands and thousands of elements, I'd
just stick with ArrayList, to be honest. (In C# 2.0 of course you could
use List<int>.)
--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too