Skip to main content

Commonly Used Interfaces and Patterns

  • Chapter
  • 973 Accesses

Abstract

The recipes in this chapter show you how to implement patterns you will use frequently during the development of Microsoft .NET Framework applications. Some of these patterns are formalized using interfaces defined in the .NET Framework class library. Others are less rigid but still require you to take specific approaches to their design and implementation of your types. The recipes in this chapter cover the following:

  • Creating serializable types that you can easily store to disk, sending across the network, or passing by value across application domain boundaries (recipe 14-1)

  • Providing a mechanism that creates accurate and complete copies (clones) of objects (recipe 14-2)

  • Implementing types that are easy to compare and sort (recipe 14-3)

  • Supporting the enumeration of the elements contained in custom collections by creating a custom iterator (recipe 14-4)

  • Ensuring that a type that uses unmanaged resources correctly releases those resources when they are no longer needed (recipe 14-5)

  • Displaying string representations of objects that vary based on format specifiers (recipe 14-6)

  • Correctly implementing custom exception and event argument types, which you will use frequently in the development of your applications (recipes 14-7 and 14-8)

  • Implementing the commonly used Singleton and Observer design patterns using the built-in features of VB .NET and the .NET Framework class library (recipes 14-9 and 14-10)

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   52.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Rights and permissions

Reprints and permissions

Copyright information

© 2008 Todd Herman, Allen Jones, Matthew MacDonald, Rakesh Rajan

About this chapter

Cite this chapter

(2008). Commonly Used Interfaces and Patterns. In: Visual Basic 2008 Recipes. Apress. https://doi.org/10.1007/978-1-4302-0604-0_14

Download citation

Publish with us

Policies and ethics