private void Button_Click(object sender, EventArgs e)
{
if (((Button)sender).Name == "button2")
{
label1.Text = "Button Two Clicked!";
}
else if (((Button)sender).Name == "button3")
{
Close();
}
}
{
if (((Button)sender).Name == "button2")
{
label1.Text = "Button Two Clicked!";
}
else if (((Button)sender).Name == "button3")
{
Close();
}
}
{
InitializeComponent();
button3.Click +=new EventHandler(Button_Click);
button2.Click += new EventHandler(Button_Click);
button2.Click += new EventHandler(ButtonTwo_Click);
}