O'Reilly logo

Visual Basic 2010 Unleashed by Alessandro Del Sole

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

Partial Classes

Starting from Visual Basic 2005, you can split the definition of a class across multiple parts using the partial classes feature. You do not actually create different classes; you simply create one class implemented within multiple parts, typically across multiple files. This feature was first introduced for separating Visual Studio’s auto-generated code from developer’s code but it is useful in different scenarios. To see a practical implementation of partial classes, simply create a new Windows Forms project. Then click the Show All Files button in Solution Explorer, expand the Form1.vb item, and double-click the Form1.designer.vb file. Inside this file you can find the definition of the Form1 class, as shown in Listing 7.2 ...

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