Chapter 3. Arrays and Collections

Arrays and collections are a key part of any programmer’s toolkit. They allow you to aggregate large amounts of information into a structured pattern and often allow you to perform searches, sorting, and key-based lookup. In this chapter, we’ll consider all of these basics, beginning with the canonical System.Array class, where you’ll learn how to quickly populate and resize an array (recipes Create and Populate an Array in One Step and Resize an Array) and create nonrectangular arrays or irregular arrays with non-zero lower bounds (recipes Create an Array That Is Not Bounded at Zero and Create a Jagged Array). Next, we’ll consider specialized collection types such as the Hashtable, ArrayList, SortedList, Queue ...

Get Microsoft® Visual Basic® .NET Programmer's Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.