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

Distributing Class Code over Multiple Code Files by Using Partial

To distribute the definition of a class or structure over several files, you can use the Partial keyword. This means that you can put any number of partial definitions into as many different source files as you like; however, all definitions must be located in the same assembly and in the same namespace.

Note

Visual Basic uses partial class definitions to separate autogenerated code in its own source files from code files you create. For example, the Windows Form Designer defines classes for controls, such as Form. You should not change the code in these generated code files.

Normally, you don’t distribute the code for a single class or structure over two or more code files, so you ...

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