Working with Arrays

As a developer, you know what arrays are. And you know that you can use an array to store a set of items, generally of the same type. In the .NET Framework 4.6 (as in older versions), arrays are reference types all deriving from the System.Array class and can be both one-dimensional and multidimensional.

Arrays Versus Collections

Collections, especially generic ones, are more efficient than arrays. I recommend working with collections instead of arrays, except when strictly needed. (For example, you might need jagged arrays.)

You can either declare an array and use it later in your code or declare it and assign it with objects. The following is an example of declaring an array of String objects, which means it can store ...

Get Visual Basic 2015 Unleashed 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.