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 illustrated how namespaces play an important role in the .NET Framework and your software development. They enable Visual Studio to manage and identify the appropriate libraries for use in different versions of .NET or when targeting different .NET platforms. Anyone who has ever worked on a large project has experienced situations in which a fix to a component was delayed because of the potential impact on other components in the same project. The CLR has the ability to version and support multiple versions of the same project. Regardless of the logical separation of components in the same project, developers who take part in the development process worry about collisions. With separate implementations for related components, it is not only possible to alleviate this concern, but also easier than ever before for a team of developers to work on different parts of the same project.

Having looked at the primary development tool in Chapter 1 and now reviewing the runtime environment, Chapter 3 will begin the process of using Visual Basic's core fundamental structure — the class.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset