Wednesday, January 16, 2013

Partial Class

Partial type definitions allow the definition of a class, struct or interface to be split into multiple files.

In File1.cs:
namespace PC
{
    partial class A { }
}
In File2.cs:
namespace PC
{
    partial class A { }
}
 
Splitting a class, struct or interface type over several files can be useful when working with large projects, or with automatically generated code such as that provided by the Windows Forms Designer. For more information, see Partial Classes.

No comments:

Post a Comment