I require a fast speed in processing my page. The count of the values to be added will be dynamic.
Which one of the above is preferred? Support with a valid reason.<
List
is always gonna be faster than an arrayList. List
dont have to box the values that are added to them.
ArrayList
only "accept" objects, so that means that while you can add any object you want to the list, it will have to be boxed (implicitly by the CLR) and then it has to be unboxed again (explicitly by you) when you need the values.
edit: here is a nice link