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

Using Classes

Even though classes are custom data types, you can handle them just as you do all the other data types in the .NET Framework. This means that you can store multiple instances of the same class in an array or any other collection. As an example, in the next exercise, you will revise the address application by using classes to represent each address.

With all the information from the previous sections, you can now rewrite your original sample program so that it uses a single array, which contains elements from the newly created type, Contact. The conversion doesn’t even require many changes.

Companion Content

Open the corresponding solution (.sln), which you can find in the \VB 2010 Developer Handbook\Chapter 08\MiniAddressoClass folder. ...

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