using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace MyFirstApp
{
public partial class FrmMain : Form
{
public FrmMain()
{
InitializeComponent();
this.button1.Click += new EventHandler(btn_Click);
this.button2.Click += new EventHandler(btn_Click);
this.button3.Click += new EventHandler(btn_Click);
}
private void btn_Click(object sender, EventArgs e)
{
Button btn = (Button)sender;
MessageBox.Show(btn.Text);
}
}
}