Information Technology Reference
In-Depth Information
Note The type modifier partial is not a keyword, so in other contexts it can be used as a programmer-
defined identifier. But when used immediately before the keywords class , struct , or interface , it signals
the use of a partial type.
For example, the box on the left of Figure 6-20 represents a file with a class declaration.
The boxes on the right of the figure represent that same class declaration split into two files.
Figure 6-20. Class split using partial types
All the partial class declarations comprising a class must be compiled together. A class
using partial class declarations has the same meaning as if all the class members were declared
within a single class declaration body.
Besides classes, you can also create partial types for structures and interfaces, which are
types I will cover in Chapters 12 and 17, respectively.
Search WWH ::




Custom Search