I have in my resources images named: {1.jpg ,2.jpg, ............., 30.jpg}
and i have buttons{btn1,btn2,.............,btn30}
all i want to do is to put by exemple image 1.jpg in a panel by clicking btn1...same goes to image2 for btn2 ..till image 30 for btn30 in the same panel
this is what i was writing in my code...

```
public partial class Form1 : Form
{
    public Form1()
    {
        InitializeComponent();
    }

    private void Form1_Load(object sender, EventArgs e)
    {
        Button[] buttons = { btn1, btn2, btn3, btn4, btn5, btn6, btn7, btn8, btn9, btn10, btn11, btn12, btn13, btn14, btn15, btn16, btn17, btn18, btn19, btn20, btn21, btn22, btn22, btn23, btn24, btn25, btn26, btn27, btn28, btn29, btn30 };

        //did this becz couldnt fill the array buttons with a for loop...hope if u know to tell me how
        for(int i=0;i<30;i++) buttons[i].Click += myEventHandler;

    }

    void myEventHandler(object sender, EventArgs e)
    { 
        Button button = sender as Button;
        for(int i=0;i<30;i++)
        {
            if (sender.Equals ////howw to get the index of the button
        }

        Bitmap b=new Bitmap(myProject.Properties.Resources  //how to apply the index of the button in getting the name of the image;
        panel2.BackgroundImage=b;
    }
}

```