Tips and Hints on Using Collections
Depending on the nature of the problem you are trying to solve, different approaches can be considered as optimal, with collections as well as with other software problems. We try to address a few typical scenarios in the following list:
Small/medium collection, does not change much (no items added or removed) after it is created, no searches. Use a regular Visual Basic .NET array. If you need to expose it to client objects, use ArrayList and get the clients a read-only copy.
Small/medium collection, does change (many items added or removed) after it is created, no searches. Use an ArrayList or a custom collection derived from it, if the additions are always at the end. If you expect many inserts and removes, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access