I have a program which creates an array of Picture Boxes. I need to assign each PictureBox it's own DoubleClick method but I'm not sure how to do it without writing the same method endless times. Is there a way to replace "pictureBox1_DoubleClick" with a new method?
pBXR.DoubleClick += new System.EventHandler(pictureBox1_DoubleClick);
pBXR.DoubleClick += new System.EventHandler(pictureBox1_DoubleClick);