O'Reilly logo

Microsoft® Visual Basic® 2010 Developer’s Handbook by Klaus Löffelmann and Sarika Calla Purohit

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

Static Elements

So far you have learned about class members such as properties, methods, and fields that exclusively apply to class instances, because those elements rely on the ability to access the instance fields of a class to operate correctly. If you were to try to access these instance fields without first creating an instance of the class, the .NET Framework would have thrown the infamous NullReferenceException.

However, you also have the option to create components that don’t access class members. This means that they can therefore be called without instantiation. The following sections show how this works.

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