Possible Duplicate:
Unsubscribe anonymous method in C#
I have some Panels that when created they are delegated to become clickable:
int z2 = z;
PicBx[z].Click += delegate { clicked(z2, null); };
I want to be able to remove this if the program calls for it. I tried using:
int z2 = z;
PicBx[z].Click -= delegate { clicked(z2, null); };
But it didn't work. Is there any way to remove the clickable delegation from it?