Chapter 12

Advanced Object-Oriented Techniques

What You Will Learn in this Chapter

  • How to create a favorite viewer
  • How to create an alternative favorite viewer
  • How to work with shared properties and methods
  • Understanding object-oriented and memory management

Wrox.com Code Downloads for this Chapter

The wrox.com code downloads for this chapter are found at www.wrox.com/remtitle.cgi?isbn=1118311813 on the Download Code tab. The code is in the 311813 C12.zip download and individually named according to the names given throughout the chapter.

In Chapter 11, you looked at how you can build your own objects. Prior to that, you had been mostly using objects that already existed in the .NET Framework to build your applications. In this chapter, you'll take a look at some more object-oriented software development techniques.

In the first half of this chapter, you create your own classes. You will create a single-tier application like the others discussed so far in this book. The idea of creating two-tier applications, as opposed to single-tier applications, is introduced in Chapter 15. You then learn about creating your own shared properties and methods. These are very useful when you want a method or property to apply to a class as a whole, rather than a specific instance of that class. Finally, you look at memory management in Visual Studio 2012 and what you can do to clean up your objects properly.

Building a Favorites Viewer

In the first half of this chapter, you'll build a simple ...

Get Beginning Visual Basic 2012 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.