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 ;-)
--
Eric Newton
C#/ASP Application Developer
http://ensoft-software.com/
(e-mail address removed)-software.com [remove the first "CC."]
Jan Tielens said:
Hi
In this scenario I usually use an ArrayList to easily build the array. Once
finished, I use the ToArray method to get a real Array:
System.Collections.ArrayList al = new System.Collections.ArrayList();
al.Add(3);
al.Add(5);
///...
return al.ToArray(typeof(int));
--
Greetz
Jan Tielens
________________________________
Read my weblog:
http://weblogs.asp.net/jan
from