As the name indicates, partial class definitions can be split up across multiple physical files. To the compiler, this does not make a difference, as all the fragments of the partial class are grouped and the compiler treats it as a single class. One common usage of partial classes is the separation of automatically-generated code from programmer-written code.
Below is an example of a partial class.
Listing 1: Entire class definition in one file (
Listing 2: Class split across multiple files