Why to use Partial Classes?
Partial classes have many advantages. The most visible being the ability to split the class in multiple files. This is quite evident in Windows forms.
Windows forms has the class being split between two files - Form1.cs and FormDesigner.cs
partial class
Form1
{
///
/// Required designer variable.
///
private System.ComponentModel.IContainer components = null;
And
public partial class
Form1 : Form
{
publicForm1()
{
check_whitespace();
InitializeComponent();
}
The same concept can be effectively used in the classes you create also.
No comments:
Post a Comment