命名空间相同、类名相同的两个类。
eg:
namespace WindowsFormsApplication1
{
public partial class Test : Form
{
public Test()
{
InitializeComponent();
}
private void btnTest_Click(object sender, EventArgs e)
{
MBox("Partial关键字真不错");
}
}
}
另一个:
namespace WindowsFormsApplication1
{
partial class Test
{
void MBox(string msg)
{
MessageBox.Show(msg);
}
}
}