Information Technology Reference
In-Depth Information
Figure 6-19.
Hierarchy of strictly restrictive accessor levels
Partial Classes
The declaration of a class can be partitioned among several partial class declarations.
Each of the partial class declarations contains the declarations of some of the class
members.
The partial class declarations of a class can be in the same file or in different files.
Each partial declaration must be labeled as
partial class
, in contrast to the single key-
word
class
. The declaration of a partial class looks the same as the declaration of a normal
class, other than the addition of the type modifier
partial
.
Type modifier
↓
partial class MyPartClass // Same class name as following
{
member1 declaration
member2 declaration
...
}
Type modifier
↓
partial class MyPartClass // Same class name as preceding
{
member3 declaration
member4 declaration
...
}