O'Reilly logo

Professional Visual Basic 2012 and .NET 4.5 Programming by Todd Herman, Gastón Hillar, David McCarter, Rob Windsor, Billy Hollis, Bill Sheldon

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

Summary

This chapter introduced the CLR. You first looked at its memory management features, including how .NET uses namespaces to structure the classes available within the Framework. The chapter reviewed how the .NET Framework is handling multiple profiles and touched on the Visual Basic specific features of the My namespace. Chapter highlights include the following:

  • Whenever possible, do not implement the Finalize method in a class.
  • If the Finalize method is implemented, then also implement the IDisposable interface, which can be called by the client when the object is no longer needed.
  • There is no way to accurately predict when the GC will collect an object that is no longer referenced by the application (unless the GC is invoked explicitly).
  • The order in which the GC collects objects on the managed heap is nondeterministic. This means that the Finalize method cannot call methods on other objects referenced by the object being collected.
  • Leverage the Using keyword to automatically trigger the execution of the IDisposable interface.
  • The Portable Library project type allows you to target multiple different .NET Framework platforms.
  • That namespace hierarchies are not related to class hierarchies.
  • How to review and add references to a project.
  • How to import and alias namespaces at the module level.
  • Creating custom namespaces.
  • Using the My namespace.

This chapter also examined the value of a common runtime and type system that can be targeted by multiple languages. This chapter ...

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