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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access