Eric Newton <er**@cc.ensoft-software.com> wrote:
Good solution. You'll begin to take a boxing hit if the list becomes >50
items, since ArrayList stores as object type.
If its gonna be loading a lot of integers then I'd recommend building a
class for managing a int[] for efficiency reasons if this is gonna be a hard
hit area.
/me looks forward to C# generics ;-)
While generics will indeed be very handy here, I certainly wouldn't
start writing my own type to deal with this kind of thing unless I'd
already determined that the boxing hit was actually causing a problem.
Premature optimisation is a bad idea, IMO.
--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too