July 2015
Intermediate to advanced
1300 pages
87h 27m
English
You can split the definition of a class across multiple parts using the partial classes feature. You do not actually create different classes; you create one class implemented within multiple parts, typically across multiple files. This feature was first introduced in Visual Basic 2005 for separating Visual Studio’s auto-generated code from developer’s code, but it is useful in various scenarios. To see a practical implementation of partial classes, 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.
LISTING ...