VB.NET Developer's Guide

Now that we have covered the fundamentals of programming in Visual Basic .NET, let s take a look at some more advanced topics. The topics in this chapter are eclectic, but they are all important programming concepts. In object-oriented programming, we saw how there can be multiple instances of an object with different sets of data values. Shared members are class members that are shared across all instances of an object. This means that if the value is changed in one instance of an object, that change would be propagated to all of the instances. In previous versions of Visual Basic, you could create standard modules. You can still do this in .NET, but it creates a class where all the members are shared members.
We have covered the concept of namespaces and how they are used. In this chapter, we explore the programmatic side of namespaces and how to utilize them in your projects. The Imports keyword is used to allow the use of namespaces from other referenced projects or assemblies. This simplifies the use of other components and classes. An interface is a template for class members. It creates the contract for how the members are to be used. It does not provide the actual implementation of the class. In previous versions of Visual Basic, you could not explicitly create interfaces. You could create an interface of sorts by creating a class with all the methods left empty and then implement it. The process is cleaner in Visual...