O'Reilly logo

Microsoft® Visual Basic® 2010 Developer’s Handbook by Klaus Löffelmann and Sarika Calla Purohit

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Collection Basics

Arrays have a crucial disadvantage in .NET Framework. Even though they can be enlarged or reduced dynamically at runtime, the programming effort that goes into them is quite extensive. If you have experience with earlier versions of Visual Basic, you have surely come across a different type, called a Collection, to which you were first introduced in Chapter 1.

Collections permit developers to manage elements much like arrays, but collections can grow as needed. However, this also means that indexing by using numbers to identify elements can only work conditionally. For example, when an array has 20 elements, and you want to expand it to hold 21 elements, you can’t just add the element—you must expand the array first. But with ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required