partial用来将一个class、struct或interface的定义拆分,写在不同的源文件中。
平时使用中可以把不经常修改的方法提取出来放到partial关键字声明的类中。
编译应用程序时将会把partial及其同名的类组合起来。
如public partial class Form1 : Form和public class Form1 : Form
Partial type definitions allow the definition of a class, struct or interface to be split into multiple files.
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.