ArrayList stores only Objects. For a reference-type (like String
) this is no problem but for a ValueType (int, DateTime, ..) it is.
These valuetypes need to be converted to an object before you can store them as plain Object. This "converting to object" is called "boxing" and takes a little bit of time.
When you read the value back, you need to convert from Object to int
(or whatever it was). This is called "unboxing".